I’m trying to use JUCE for some parts of a VST plugin that is not written with the VST wrapper of JUCE.
I’m unable to load the VST in Live because, if I call initialiseJuce_NonGUI, it crashes Ableton Live 7
I’ve seen in the Juce VST wrapper that there is a comment about initialiseJuce_GUI crashing the host… so I think you already have had similar problems. How do I solve this?
I’ve noticed that the problem is caused by the following line in initialiseStats ():
Is this known to cause possible side effects?
No, wouldn’t have thought it’d affect anything…
I found that, if I uncomment the NSApplicationLoad() line that precedes it, the crash does not happen.
Since that function is related to Carbon-Cocoa interaction (as far as I can tell from online documentation), is it possibile that it is needed if I want to load my plugin in a host that does not support Cocoa natively yet?
Well yes, if the host is so old-school that it doesn’t even call NSApplicationLoad itself, then it might indeed have problems!
FWIW, here at Arturia we have done something similar when updating our plugins to V2.0: the plugins are still VSTGui based, but use Juce for a selected part of the UI (SoundMap).
So we do call initialiseJuce_GUI() (not NonGUI of course) and never encountered problem doing so.