I think there might be a problem with the Singleton Class code of JUCE when using it in a DLL. I have problems/crashes that are caused by AudioPluginFormatManager::getInstance(). These problems arise in Cubase SX 3, but only if Cubase once scanned my plugin (I think it creates and deletes it again).
I think the problem arises from the fact that the AudioPluginFormatManager inherits from DeletedAtShutdown. This works nicely for .exe’s, but DLL’s will stay in memory and so their static values are not set back to 0, because the DeletedAtShutdown’s deleteAll() will only delete the objects, but not call deleteInstance() of the Singleton Class code which sets the _singletonInstance variable back to 0.
So, next time the plugin gets loaded again, the _singletonInstance variable of the singleton code will still contain a non-0 value and you get a crash.