On Do, 2007-01-04 at 10:58 +0200, Sergei Steshenko wrote:
> On Thu, 04 Jan 2007 09:43:16 +0100
> Sebastian Schäfer <[EMAIL PROTECTED]> wrote:
> 
> > On Do, 2007-01-04 at 00:41 +0200, Sergei Steshenko wrote:
> > [removed stuff]
> > 
> > After applying all changes the behaviour stays the same. Following is
> > the output of applyplugin (cleared of my debug fprintf()s):
> > 
> > ------------------
> > # applyplugin herbie.wav
> > herbie_equalized.wav /usr/lib/ladspa/mbeq_119700.so MChMBEq 5 5 5 5 5 5
> > 5 5 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47
> > -47 -47 -47 -47 -47 -47 -47
> > ladspa_descriptor: returning MChMBEqDescriptor=0804cf18
> > just after allocation (*plugin_data).comp_L=00000000 at line number 901
> > just after allocation (*plugin_data).comp_R=00000000 at line number 909
> > just after allocation (*plugin_data).comp_C=00000000 at line number 917
> > just after allocation (*plugin_data).comp_LFE=00000000 at line number
> > 925
> > just after allocation (*plugin_data).comp_LS=00000000 at line number 933
> > just after allocation (*plugin_data).comp_RS=00000000 at line number 941
> 
> [stuff deleted]
> 
> OK, OK, at least the segmentation fault stopped being mysterious :-) -
> the '00000000' means the program is trying to dereference NULL pointer,
> so no wonder it crashes.
> 
> Now we have to find out why this is happening.
> 
> 
> Sebastian, your printout is from modified by you source code of
> mine, and the code was intended to be modified, but let's return
> to the latest unmodified version I sent you yesterday and let's first
> check how it behaves.
> 
> First of all, I do not understand how the program at all continues
> after obtaining NULL after allocation - in my code the allocations are
> performed using this macro:
> 
>     111 #define CALLOC_AND_CHECK(type, ptr, number_of_items, item_size, 
> line_number) \\
>     112 if((ptr = (type)calloc(number_of_items, item_size)) == NULL) \\
>     113   {\\
>     114   fprintf(stderr, "$MBEQ::__config_hash{FileLabel}: !!! ERROR !!! 
> could not allocate memory at line number %d of %s file\\n", line_number, 
> __FILE__);\\
>     115   exit(1);\\
>     116   }
> 
> , i.e. in case of NULL pointer the program should have exited with an error
> message produced by line #114.
> 

OK, I now used you initial version from yesterday and applied the
changes you mailed me last night.

Output:
----------------
# applyplugin herbie.wav
herbie_equalized.wav /usr/lib/ladspa/mbeq_119700.so MChMBEq 5 5 5 5 5 5
5 5 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47 -47
-47 -47 -47 -47 -47 -47 -47
ladspa_descriptor: returning MChMBEqDescriptor=0804cf18
just after plan calculation: (*plugin_data).plan_rc_L=08106bf0 at line
number 929
just after plan calculation: (*plugin_data).plan_rc_R=08106910 at line
number 932
just after plan calculation: (*plugin_data).plan_rc_C=08103f40 at line
number 935
just after plan calculation: (*plugin_data).plan_rc_LFE=08108b90 at line
number 938
just after plan calculation: (*plugin_data).plan_rc_LS=081149c0 at line
number 941
just after plan calculation: (*plugin_data).plan_rc_RS=08112d70 at line
number 944
instantiateMChMBEq :INFO: actual 00 band bin number: 2 frequency:
21.5332Hz
instantiateMChMBEq :INFO: actual 01 band bin number: 3 frequency:
32.2998Hz
instantiateMChMBEq :INFO: actual 02 band bin number: 4 frequency:
43.0664Hz
instantiateMChMBEq :INFO: actual 03 band bin number: 5 frequency:
53.833Hz
instantiateMChMBEq :INFO: actual 04 band bin number: 6 frequency:
64.5996Hz
instantiateMChMBEq :INFO: actual 05 band bin number: 7 frequency:
75.3662Hz
instantiateMChMBEq :INFO: actual 06 band bin number: 9 frequency:
96.8994Hz
instantiateMChMBEq :INFO: actual 07 band bin number: 12 frequency:
129.199Hz
instantiateMChMBEq :INFO: actual 08 band bin number: 15 frequency:
161.499Hz
instantiateMChMBEq :INFO: actual 09 band bin number: 19 frequency:
204.565Hz
instantiateMChMBEq :INFO: actual 10 band bin number: 24 frequency:
258.398Hz
instantiateMChMBEq :INFO: actual 11 band bin number: 30 frequency:
322.998Hz
instantiateMChMBEq :INFO: actual 12 band bin number: 37 frequency:
398.364Hz
instantiateMChMBEq :INFO: actual 13 band bin number: 47 frequency:
506.03Hz
instantiateMChMBEq :INFO: actual 14 band bin number: 59 frequency:
635.229Hz
instantiateMChMBEq :INFO: actual 15 band bin number: 75 frequency:
807.495Hz
instantiateMChMBEq :INFO: actual 16 band bin number: 94 frequency:
1012.06Hz
instantiateMChMBEq :INFO: actual 17 band bin number: 119 frequency:
1281.23Hz
instantiateMChMBEq :INFO: actual 18 band bin number: 150 frequency:
1614.99Hz
instantiateMChMBEq :INFO: actual 19 band bin number: 189 frequency:
2034.89Hz
instantiateMChMBEq :INFO: actual 20 band bin number: 238 frequency:
2562.45Hz
instantiateMChMBEq :INFO: actual 21 band bin number: 300 frequency:
3229.98Hz
instantiateMChMBEq :INFO: actual 22 band bin number: 377 frequency:
4059.01Hz
instantiateMChMBEq :INFO: actual 23 band bin number: 476 frequency:
5124.9Hz
instantiateMChMBEq :INFO: actual 24 band bin number: 599 frequency:
6449.19Hz
instantiateMChMBEq :INFO: actual 25 band bin number: 755 frequency:
8128.78Hz
instantiateMChMBEq :INFO: actual 26 band bin number: 951 frequency:
10239Hz
instantiateMChMBEq :INFO: actual 27 band bin number: 1198 frequency:
12898.4Hz
instantiateMChMBEq :INFO: actual 28 band bin number: 1510 frequency:
16257.6Hz
instantiateMChMBEq :INFO: actual 29 band bin number: 1902 frequency:
20478.1Hz
instantiateMChMBEq - __LINE__=1707 (*plugin_data).half_fft_length=2048
activateMChMBEq: instance=080656b8
just before using the plan: plan_rc_L=08106bf0 at line number 3880
Segmentation fault
--------------

Now the allocations are correct, but it still segfaults. The alignment
seems OK too.

> 
> Regards,
>   Sergei.
Regards,
Sebastian


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to