FluidSynth Example on MacOS gives segfault

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FluidSynth Example on MacOS gives segfault

Rohit Sanjay
Hi, I'm just trying to acquaint myself with FluidSynth by testing out a few example codes given in the docs.

I tried to run the code written here, with a random sf2 file that I found online. I run into the following warning and segfault. I'm not sure how to proceed. Please help me out. Thanks.

$ gcc -g -O -o fluidsynth_simple fluidsynth_simple.c -lfluidsynth
$ ./fluidsynth_simple ../Downloads/JJSF2.SF2
fluidsynth: warning: No preset found on channel 0 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 1 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 2 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 3 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 4 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 5 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 6 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 7 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 8 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 9 [bank=128 prog=0]
fluidsynth: warning: No preset found on channel 10 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 11 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 12 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 13 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 14 [bank=0 prog=0]
fluidsynth: warning: No preset found on channel 15 [bank=0 prog=0]
[1]    57358 segmentation fault  ./fluidsynth_simple ../Downloads/JJSF2.SF2


Rohit

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: FluidSynth Example on MacOS gives segfault

Ceresa Jean-Jacques
 
Hi, Rohit
 
I suspect the "segmentation fault" occurs during the execution of fluid_synth_sload(). This souldn't occur
even if the soundfont file is malformed.
 
Please, would you try these 2 simple tests and report each results:
 
1) First test: use a well know correct sf2 (i.e GUGSv1_47.sf2).
 
2) Second test: still using JJSF2.SF2, In the source file , add "printf" before and after fluid_synth_sload() like this:
....
printf("fluidsynth_simpe: start  loading the soundfont file\n");
/ *Load the soundfont */
if(fluid_synth_sload(synth, argv[1], 1) == -1)
{
     fprintf(stderr, "Failed to load the SoundFont\n");
     err = 4;
     goto cleanup;
}
printf("fluidsynth_simpe: end  loading the soundfont file\n");
.....

Cheers.

jjc

 

> Message du 23/02/20 21:02

> De : "Rohit Sanjay" <[hidden email]>
> A : [hidden email]
> Copie à :
> Objet : [fluid-dev] FluidSynth Example on MacOS gives segfault
>
>
Hi, I'm just trying to acquaint myself with FluidSynth by testing out a few example codes given in the docs.

>
I tried to run the code written here, with a random sf2 file that I found online. I run into the following warning and segfault. I'm not sure how to proceed. Please help me out. Thanks.

>
$ gcc -g -O -o fluidsynth_simple fluidsynth_simple.c -lfluidsynth
$ ./fluidsynth_simple ../Downloads/JJSF2.SF2
fluidsynth: warning: No preset found on channel 0 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 1 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 2 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 3 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 4 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 5 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 6 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 7 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 8 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 9 [bank=128 prog=0]
> fluidsynth: warning: No preset found on channel 10 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 11 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 12 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 13 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 14 [bank=0 prog=0]
> fluidsynth: warning: No preset found on channel 15 [bank=0 prog=0]
> [1]    57358 segmentation fault  ./fluidsynth_simple ../Downloads/JJSF2.SF2

>

>
Rohit


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: FluidSynth Example on MacOS gives segfault

fluid-dev mailing list
Before you try JJC's advice: Could it be that you installed fluidsynth
via Homebrew? If so, you probably installed version 2.0.8 which
unfortunately is broken on MacOS. And for more than 3 months Homebrew
is unable to update it, although they already have the second request
for it [1]. Your best option then is to get the latest fluidsynth
release, compile and install it yourself. (...or yell at Homebrew...)

[1] https://github.com/Homebrew/homebrew-core/pull/48863

Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev