When opening the Sylenth1 plugin in debug mode i get an error that this is not possible and the Juce application is not usable anymore:
Attempting to load VST: /Library/Audio/Plug-Ins/VST/Sylenth1.vst
2017-04-14 17:56:02.985652 JuceGui[69656:10212801] CFUserNotificationDisplayAlert: called from main application thread, will block waiting for a response.
*** Leaked objects detected: 1 instance(s) of class ModuleHandle
JUCE Assertion failure in juce_LeakedObjectDetector.h:97
My question is: Can i catch such a message from the VST plugin when trying to open it without having to restart the whole application? I use the following code, where the error happens in the bold line:
> KnownPluginList plist;
> OwnedArrayjuce::PluginDescription pluginDescriptions;
> juce::VSTPluginFormat format;
> plist.scanAndAddFile(synth->pluginPath, true, pluginDescriptions, format);
> if (pluginDescriptions.size() > 0) { … }
Neither a try/catch nor JUCE_TRY seem to help here. Internally Juce tries to instantiate that VST plugin, whereat any error is not propagated to my code so that i have the possibility to catch it.
Thanks for your help and how i can make my code more safe.