More than Two Plugin Instances Just Stop Running
-
This is bizarre.
-
If I place two instances of my plugin in a DAW, and recall the document, everything loads up.
-
But if I add a third instance, then when I next load the DAW document, then last plugin instance doesn't work.
-
If I keep adding instances, whenever I reload the document, only the last two instances work.
The other thing is how they don't work — none of my error messages fire — and they cover pretty much everything.
All I can see is that, at some point, functions stop getting called in the plugin while it loads.
Is there a way for me to see the console output when a plugin is hosted?
Any ideas? Thank you.
EDIT: Solved. It was indeed just stopping. The plugin was timing out. Apparently, as instances increases, the preset loading speed decrease. Which makes…no sense, lol. It's just HISE's default preset manager, and there's only six components saved. But solve well enough.
-
-
@clevername27 said in More than Two Plugin Instances Just Stop Running:
Is there a way for me to see the console output when a plugin is hosted?
You can run the DAW in Visual Studio's debugger (you also need to be using a debug build of your plugin). I've only tested this with Reaper.
-
@d-healey Cool - thank you. Do you have a video on that?
-
@clevername27 said in More than Two Plugin Instances Just Stop Running:
Do you have a video on that?
Not mine - https://www.youtube.com/watch?v=aPMTYlMpbj0
-
@d-healey Rule 35: If there's a question about HISE, Dave knows of a video.
-
-
-
@clevername27 said in More than Two Plugin Instances Just Stop Running:
The plugin was timing out. Apparently, as instances increases, the preset loading speed decrease. Which makes…no sense, lol. It's just HISE's default preset manager, and there's only six components saved. But solve well enough.
This is bizarre indeed. What do you mean by timing out? The "compile" timeout of 5 seconds?
-
The only thing that can decrease the performance of multiple instances is if you have lots of JUCE timer callbacks as they share a thread across instances but most script timers are trying to workaround that issue.
-
Thanks for your responses. It all makes sense now.
@aaronventure I assume it was timing out during execution because none of my error-handling fired (and Alan Turing was no help). The plugin didn't crash - the chain of function calls during my init process just seemed to stop.
@Christoph-Hart Like running 17 timer-based animations (one for each plugin instance) as the DAW loads a project?
I run a panel animation on a timer when my plugin initialises. Any instances beyond two would stop. So, I inserted a timer at the beginning of the preset post-loading callback,— before running the timer-based animation. And that worked. At 512ms, four instances of the plugin finished initialising. At 1024ms, 10 instances. At 4096ms, all 17 instances initialised.
Now, you may be asking, why would a developer run an animation when a plugin starts up, considering that no one can see it? You can read any book on human interface design. Look it up. You won't find it there, because it's not true. But you can look it up. The point is, I should remove the pointless animations.
-
@clevername27 said in More than Two Plugin Instances Just Stop Running:
The point is, I should remove the pointless animations.
If you want a welcome screen, you can tie to a hidden panel which you then switch to value 1 and save in preset. So your animation checks if the panel is 0, which it should be on the very first run. Any subsequent loadings of the plugin will have the value stored as 1 so the animation won't run.
You may have a tiny bit of trouble working with that in HISE: you'll have to gate the the timer starting with a check Engine.isHise == false and make sure the panel is set to 0 when you're exporting.
-
@aaronventure Thank you, good sir.