Problem with initialiseJuce_NonGUI


#1

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?


#2

I’ve noticed that the problem is caused by the following line in initialiseStats ():

[NSApplication sharedApplication];

Is this known to cause possible side effects?


#3

No, wouldn’t have thought it’d affect anything…


#4

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?


#5

Well yes, if the host is so old-school that it doesn’t even call NSApplicationLoad itself, then it might indeed have problems!


#6

Hello yfede,
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.