AudioUnitFormatHelpers::insideCallback == 0 assert

Hey Jules, I've run into this assert in ~AudioUnitPluginInstance and I'm not quite understanding it's purpose.  I load my plugins on the message thread but delete them on another thread, so this assert can happen if I'm instantiating plugin "A" while I attempt to deinstantiate plugin "B".  I've search around for some info on Audio Unit lifetimes and if one should or shouldn't deallocate them on a separate thread but haven't landed on anything concrete.  That said the assert looks like it was designed to catch some other kind of issue.

Can you provide some info on what it's intended to catch?

It's really just there to catch plugins that run stupid modal loops in their startup code, which could lead to recursive calls that delete the plugin before it's finished initialising. (Though TBH I'm not sure what you could do to fix it if the assertion did get triggered for real)

I hadn't expected anyone to be using multiple threads, but that's a good point - I've changed it now to use a thread-local variable, so it should avoid the assertion for you.

If you're doing plugin hosting work, have you tried the new VST3 stuff yet? Would be interested to get more feedback from people about that..

Great, thanks!  I am yes, but sorry no I haven't been able to look at it yet.  I do plan to make use of it but I'm on a contract for an unrelated project until March and so my time is pretty limited until then.  I'll keep it noted though and if some extra time pops up then I'll see if I can get a few tests in sooner than later.