I have a customer who gets a crash on quitting Wavelab 10.0.30 on OS X if multiple vst3 instances of my plugin is inserted when doing a montage session. He contacted Steinberg about this and they blame my plugin for the problem (naturally). After a few attempts I managed to recreate the crash on my own machine using a debug build. Thankfully, Wavelab allows attaching the XCode debugger.
Then I switched to the Juce GainPlugin demo and without any changes to any code, the exact same crash happens. To reproduce, load two audio files into Wavelab, create a Montage, insert a juce-built vst3 plugin on both tracks. Then save the montage :). Now quit Wavelab and after a few second the crash happens (most of the time):
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.JUCE.GainPlugin 0x000000015b8dfad8 juce::ComSmartPtr<Steinberg::Vst::IHostApplication>::~ComSmartPtr() + 40 (juce_VST3Common.h:401)
1 com.JUCE.GainPlugin 0x000000015b8dfa35 juce::ComSmartPtr<Steinberg::Vst::IHostApplication>::~ComSmartPtr() + 21 (juce_VST3Common.h:401)
2 com.JUCE.GainPlugin 0x000000015b8dfb5e juce::JucePluginFactory::~JucePluginFactory() + 94 (juce_VST3_Wrapper.cpp:2956)
3 com.JUCE.GainPlugin 0x000000015b8df275 juce::JucePluginFactory::~JucePluginFactory() + 21 (juce_VST3_Wrapper.cpp:2956)
4 com.JUCE.GainPlugin 0x000000015b8df299 juce::JucePluginFactory::~JucePluginFactory() + 25 (juce_VST3_Wrapper.cpp:2953)
5 com.JUCE.GainPlugin 0x000000015b8de9f0 juce::JucePluginFactory::release() + 256 (juce_VST3_Wrapper.cpp:2976)
6 net.steinberg.WaveLab-Pro-10-0 0x000000010c8e9b1e 0x10af4e000 + 26852126
7 net.steinberg.WaveLab-Pro-10-0 0x000000010c8ec000 0x10af4e000 + 26861568
8 org.qt-project.QtCore 0x000000010e159829 QHashData::free_helper(void (*)(QHashData::Node*)) + 73
9 net.steinberg.WaveLab-Pro-10-0 0x000000010c8eb90c 0x10af4e000 + 26859788
10 net.steinberg.WaveLab-Pro-10-0 0x000000010bc6a680 0x10af4e000 + 13747840
11 net.steinberg.WaveLab-Pro-10-0 0x000000010bc5fb64 0x10af4e000 + 13704036
12 net.steinberg.WaveLab-Pro-10-0 0x000000010cb14597 0x10af4e000 + 29123991
13 libdyld.dylib 0x00007fff7055c015 start + 1
My conclusion is that the problem is either in Juce or Wavelab - my feeling is that Wavelab is to blame as otherwise weād see the same issue in more vst3 hosts. Itās also curious that this does not happen when inserting the same plugin on the master section.
Has anyone else seen that and maybe found a workaround?