My plugin works just fine when used separately as AU, VST2 & VST3.
But when I load all three into a host, there’s an interaction that causes a crash under circumstances. (I’ve tried the following in AudioPluginHost and Gig Performer)
-
Open and close the UI of the AU multiple times…all good.
-
Open the UI of the AU and VST2 in any order, multiple times…all good.
-
Open the UI of the AU and VST3 in any order, multiple times…all good.
-
Open the UI of the VST2, then open the VST3…CRASH.
-
Open the UI of the VST3, then open the VST2…CRASH.
-
Open the UI of the VST2, then open another VST2…all good.
-
Open the UI of the VST3, then open another VST3…all good.
So it seems that the AU is not involved…it’s just between some interaction between the VST2 & VST3.
The crash stack trace looks like this: (it crashes in the same place whether it’s the VST2 or VST3)
Thread 0 Crashed:: JUCE Message Thread Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff62eacdbc objc_registerClassPair + 32
1 com.myaudio.myplugin 0x00000001126e92e8 juce::ObjCClass<NSView>::registerClass() + 24 (juce_osx_ObjCHelpers.h:244)
2 com.myaudio.myplugin 0x00000001126e6e4b juce::JuceNSViewClass::JuceNSViewClass() + 2043 (juce_mac_NSViewComponentPeer.mm:1627)
3 com.myaudio.myplugin 0x0000000112653305 juce::JuceNSViewClass::JuceNSViewClass() + 21 (juce_mac_NSViewComponentPeer.mm:1628)
4 com.myaudio.myplugin 0x0000000112653286 juce::NSViewComponentPeer::createViewInstance() + 54 (juce_mac_NSViewComponentPeer.mm:2092)
5 com.myaudio.myplugin 0x00000001126f0f56 juce::NSViewComponentPeer::NSViewComponentPeer(juce::Component&, int, NSView*) + 438 (juce_mac_NSViewComponentPeer.mm:83)
6 com.myaudio.myplugin 0x00000001126537ab juce::NSViewComponentPeer::NSViewComponentPeer(juce::Component&, int, NSView*) + 43 (juce_mac_NSViewComponentPeer.mm:194)
7 com.myaudio.myplugin 0x0000000112653755 juce::Component::createNewPeer(int, void*) + 85 (juce_mac_NSViewComponentPeer.mm:2206)
8 com.myaudio.myplugin 0x000000011254f123 juce::Component::addToDesktop(int, void*) + 1571 (juce_Component.cpp:623)
9 com.myaudio.myplugin 0x000000011223fde7 juce::attachComponentToWindowRefVST(juce::Component*, void*, bool) + 103 (juce_VST_Wrapper.mm:181)
10 com.myaudio.myplugin 0x0000000111dfcbc1 juce::JuceVST3EditController::JuceVST3Editor::attached(void*, char const*) + 625 (juce_VST3_Wrapper.cpp:854)
11 com.roli.juce.pluginhost 0x0000000102130e87 juce::VST3Classes::VST3PluginWindow::attachPluginWindow() + 327
12 com.roli.juce.pluginhost 0x00000001021301e9 juce::VST3Classes::VST3PluginWindow::componentVisibilityChanged() + 25
13 com.roli.juce.pluginhost 0x00000001024785a6 juce::ComponentMovementWatcher::componentVisibilityChanged(juce::Component&) + 134
14 com.roli.juce.pluginhost 0x00000001025da321 juce::Component::sendVisibilityChangeMessage()::$_2::operator()(juce::ComponentListener&) const + 33
15 com.roli.juce.pluginhost 0x0000000102428520 void juce::ListenerList<juce::ComponentListener, juce::Array<juce::ComponentListener*, juce::DummyCriticalSection, 0> >::callChecked<juce::Component::sendVisibilityChangeMessage()::$_2, juce::Component::BailOutChecker>(juce::Component::BailOutChecker const&, juce::Component::sendVisibilityChangeMessage()::$_2&&) + 128
16 com.roli.juce.pluginhost 0x000000010242823c juce::Component::sendVisibilityChangeMessage() + 108
17 com.roli.juce.pluginhost 0x0000000102427dfc juce::Component::setVisible(bool) + 508
18 com.roli.juce.pluginhost 0x0000000101f91264 PluginWindow::PluginWindow(juce::AudioProcessorGraph::Node*, PluginWindow::Type, juce::OwnedArray<PluginWindow, juce::DummyCriticalSection>&) + 1108
19 com.roli.juce.pluginhost 0x0000000101f8cdfb PluginWindow::PluginWindow(juce::AudioProcessorGraph::Node*, PluginWindow::Type, juce::OwnedArray<PluginWindow, juce::DummyCriticalSection>&) + 43
20 com.roli.juce.pluginhost 0x0000000101f8cba6 FilterGraph::getOrCreateWindowFor(juce::AudioProcessorGraph::Node*, PluginWindow::Type) + 710
...
...
...
So, it’s crashing in my plugin in the wrapper classes as it’s creating the editor, but before it actually it’s my code.
But if I do the same test with a simple plugin, it doesn’t crash, so somehow my plugin code is suspect in some way, but I have no idea how…and I have no idea how to debug this.
I’m on develop, pretty close to the current commit.
Any ideas?