Are there any hosts (de)constructing plugins on different threads?

Hello JUCErs,

I’ve tested with Ableton Live 9 and it seems to construct and deconstruct the plugins on the same thread (and so does the JUCE sample Plugin Host - it does it on the Juce Message thread).

My plugins register with a shared resource upon construction and deregister from it on deletion, but I have no guards for threading issues in the resource in question.

And this seems like a good convention (init and delete on the Message Thread), but conventions are often ignored - are there any hosts that don’t follow this guide-line and actually (de)construct plugins in-parallel?

Cheers!

In my experience, most DAWs will play it safe and use the same thread for this, and usually that’ll be the message thread.

If you want a good test case, try it in WaveLab, which tends to be pretty free-and-easy about how it chooses to use threading.

1 Like

Tested with 64bit WaveLab Elements 9.0.20 - init and delete is done on the same thread.

Thanks @jules.

I would suggest testing with Apple Final Cut Pro, I recall that a lot of multi-threading happens there, but I suspect the destructing is still on the same thread. A good test for a plug-in in general however is to load several instances each with automation, hold the space-bar to constantly trigger the pay/pause of audio and open and close the GUI’s as much and as fast as possible, very good stress test!

2 Likes

Yeah, test it in Final Cut Pro X and optimize for this host! In my experience it is quite a bad/different host for audio plugins (i.e. it might crash, even if your plugin is a totally valid AU and rock solid in every other host).

If you move the play-head and the option ‘Audio Skimming’ is on (on by default), for each audio snippet you hear (approx. 10 a second) a new instance of your plugin will be created and destroyed. This is quite a stress test for your plugin.

A 30 day trial version of Final Cut Pro X is available at https://www.apple.com/final-cut-pro/trial/. On each minor update of FCPX you can run the new trial version for another 30 days. Or ask Apple to get the full version for testing. You might be lucky.

@anthony-nicholls : Does automation in FCPX with your plugin really work? It seems that JUCE has an issue with automation in FCPX. Please take a look at my earlier post about it: AAX plugin, automation gets all messy after a while
Sadly it didn’t got any attention by the JUCE devs.

2 Likes

That’s a good question Samuel I haven’t run up FCPX for a while, to be honest when I last done some serious testing with it I wasn’t testing plugins made with JUCE.

OK I passed this to QA and it seems we do indeed have a problem with automation in FCPX with plugins using JUCE, much like you have reported.