static Array<void*> activePlugins
in the juce wrapper source files are giving me issues. In my plugin, other plugins can be instantiated. This is an example of my issue:
• instantiate my plugin as an AU in Logic Pro (the AU wrapper's activePlugins size = 1)
• instatiate a VST in my plugin (the VST wrapper's activePlugins size = 1)
• remove the VST that was just instantiated
• create a MessageManagerLock
• remove the VST instance
• the VST wrapper's activePlugins size == 0, so shutdownJuce_GUI() is called
• the MessageManager singleton instance is deleted.
• continue cleaning up the VST, but wait! An assertion is hit because the Message thread is no longer locked even though we are still in the scope (and the same thread) where the MessageManagerLock above was declared.
Basically the MessageManager gets rebooted in the middle of a MessageManagerLock, invalidating the lock. Has anybody ran into this situation before? Is there an easy way into avoid shutdownJuce_GUI() in this scenerio ?