Will look into this later. In the meantime, could you file an issue at github? That might be a better place to continue discussion.
Tom 2017-10-28 15:45 GMT+02:00 Carlo Bramini <carlo.bra...@libero.it>: > Hello, > I synced my source tree with the latest changes in the repository, but > after that my Fluidsynth brutally crashed every time I launched it. > After an hour of debugging and regression tests, I think I have found the > cause. > The cause of all my troubles seems to be into src/utils/fluid_settings.c > and after the change "avoid accessing uninited memory": > > https://github.com/FluidSynth/fluidsynth/commit/ > 36d8f9558448e16765198b0bdce894085949dc1c > > But Fluidsynth crashed because two other bugs: > > 1) after adding that "num--;" in this commit, the test in this line: > https://github.com/FluidSynth/fluidsynth/blob/master/src/ > utils/fluid_settings.c#L425 > fails and so it tries to do FLUID_LOG() message. But while the format > string has a "%s" inside, you pass name[n] as parameter. name[n] is a > character, not a pointer, so it crashed inside the printf() because it was > an invalid address. Perhaps, you wanted to write token[n] instead. > > 2) After fixing (1), it also crashed into delete_fluid_ringbuffer(). > This function was called by delete_fluid_rvoice_eventhandler(). > And delete_fluid_rvoice_eventhandler() was called by > new_fluid_rvoice_eventhandler(). > Inside new_fluid_rvoice_eventhandler(), new_fluid_ringbuffer() returned > NULL because the above commit, so it jumped to "error_recovery" label. But > since handler->queue is NULL at this stage, the access to queue->array > inside delete_fluid_ringbuffer() causes a segmentation fault. > After doing "if (queue != NULL) {" before the two free(), this crash has > been also fixed. > > However, although these two bugs were fixed, Fluidsynth still did not work. > This is what it is printed on the console: > > ============ > fluidsynth: warning: 'synth.overflow.percussion' is not a node > fluidsynth: warning: 'synth.overflow.sustained' is not a node > fluidsynth: warning: 'synth.overflow.released' is not a node > fluidsynth: warning: 'synth.overflow.age' is not a node > fluidsynth: warning: 'synth.overflow.volume' is not a node > fluidsynth: warning: Requested number of audio channels is smaller than 1. > Changing this setting to 1. > fluidsynth: warning: Requested number of audio groups is smaller than 1. > Changing this setting to 1. > fluidsynth: warning: Invalid number of effects channels (0).Setting > effects channels to 2. > ============ > > I do not know eactly what you wanted to do with this change, but after > reverting the commit, everything started to work again and normally. > > Sincerely, > > Carlo Bramini > > _______________________________________________ > fluid-dev mailing list > fluid-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fluid-dev >
_______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev