-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Safe way to set many Params at once? (VST3 threading issue) #92
Comments
Don't try to load presets using automation. Hosts definitely shouldn't crash, but they won't appreciate it either. Load the preset the normal way instead: https://nih-plug.robbertvanderhelm.nl/nih_plug/context/gui/trait.GuiContext.html#tymethod.set_state |
set_state crashes the same way for me when used in VST3, so maybe I'm doing something else wrong. I'll have to figure out my debugger this weekend, heh. Thank you. |
Hey Robbert,
When I make this change, Bitwig is totally stable.
I believe this should call self.schedule_gui() and not the event_loop.schedule_gui() directly.
I think the updated_state_sender.send() command is allocating, and wrapping it in a permit_alloc() helped. Anyways, I hope some of this is useful. |
Hello!
I'm working on a preset browser for my second NIH-plug + egui plugin, and I'm running into issues trying to restore a preset from the UI thread. Many VST3 hosts seem to crash when modifying ~150 plugin params all at once. I've seen it so far in Waveform11/12, Ardour, and Bitwig Studio.
My initial attempt used ParamSetter:
... that appeared to work in Standalone and CLAP, but VST3 crashes in the hosts I tried.
My second attempt used the GuiContext directly like this:
... that had the same outcome, but also appeared to be executing on the wrong thread according to this Carla error:
Is there a safe way to set all these parameters?
The text was updated successfully, but these errors were encountered: