-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fluida loses GUI state on hide/show window; segfaults on second add #18
Comments
Hi |
This is somewhat related to the crash: swami/libinstpatch#63 (comment) |
Thanks for the quick response! I've tried out the patch. It looks like most values are restored, except for:
|
I've continued investigating the crash a bit. I can reproduce it on reaper, bespoke and carla. I can also reproduce this with other libfluidsynth based (e.g. https://github.com/falkTX/FluidPlug/tree/master/FluidGM.lv2). The problem here seems to be the registering/reinitialization of libinstpatch by fluidsynth. The first run of running libinstpatch's But anyway, this is not a Fluida problem. |
Yes, that's what I found as well. I've no idea how that could be fixed, unfortunately. |
Depth seems to be fixed, but for the instrument I ow see the following behavior:
Interesting idea with leaving the library open beyond the plugin's lifetime, would probably solve this. But if that's not an option... I'd probably try my luck with libinstpatch and see if we can find a way around re-registering resources - though my glib expertise is severely limited ;) |
Ah, yes. Was a bit to lazy by check the fix. Now it should really be fixed. |
The issue with libinstpatch is for hosts easily solvable. All they need to do is including <libinstpatch/libinstpatch.h> |
Turns out that there is a solution. and in line 867 (in Fluida_::instantiate(. . . ) |
Solution for GUI state works now on my machine, thanks for the fix!
|
I'm not sure, but it feels wrong to add a library into the host processing space this way. So it will be bad habit at least I guess.
and this is with fluida don't using dlopen
using multiple calls to dlopen from the same process (so, multiple instances of fluida) doesn't change that. So it seems leaking isn't really a problem with this approve. |
I definitely agree on the bad habit part. Interesting that it doesn't leak any memory. I also thought it would at least leave an extra handle open, but apparently
So I guess this is a way you could solve this in Fluida. As long as Fluida is the first plugin using something libinstpatch-based, it should work for/with all other processes, only downsite being the open |
Hi! We're observing these crashes in MusE as well, after a report. I just want to relate how MusE does things, it seems related to this discussion. MusE has a built-in synth plugin architecture called MESS. We have several synth plugins. One of our MESS plugins is our famous fluidsynth plugin. With this discussion, I was curious why we don't get any crashes with our fluidsynth plugin. A quick review reminded me that I seem to be cheating. So it seems that our fluidsynth plugin would not be quite independent after all. Does that seem to make sense? That is, why it does work OK for us. Cheers. |
Hi libisntpatch will be unloaded then automatically when you run your destructor, no extra call to deinit needed. regards |
Done! |
Great! Regardless of my previous comment (No need to deinit), I think it wouldn't hurt to call regards |
Checked: We never did call ipatch_close() anywhere. To summarize, we now call ipatch_init() in our fluidsynth MESS plugin constructor and our main.cpp, That way the main app ultimately owns the library. |
Let me start with this disclaimer: I'm not sure if this is a problem with my setup, with Fluida or with reaper. I can observe something similar when I'm using carla though.
I'm trying to use Fluida with reaper 6.71 +
FluidR3_GM.sf2
. I started out using a self compiled version of current master, but then went on to the prebuild version linked in the midi for a common baseline (most notably I compiled against libfluidsynth3, prebuild uses 2). I can add the plugin as a FX to a track, play the piano, hear sound, change instruments.The moment I hide the gui (closing and reopening the FX window or changing to another plugin, then back to Fluida) Fluida loses its GUI state. It shows None as current path and current selected input, all knobs/buttons are back at starting position. I can still hear the preselected instrument. If I had the reverb turned on previously, I could now turn it on and then off again to get it off, but the old state is somewhere stuck in there. This is reproducible with my selfcompiled and the stock version of Fluida on my system.
Secondly, if I now remove the plugin and readd it to my FX chain, then reaper segfaults. This is the stacktrace I got from coredumpctl:
Any idea what could be causing this?
The text was updated successfully, but these errors were encountered: