Tracktion / pluginval

Cross platform plugin testing and validation tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intermittent crash in juce::AudioUnitPluginInstance::cleanup()

phraemer opened this issue · comments

Doesn't happen every time but roughly every 5th run when validating an AUv2

With arguments:

--verbose --timeout-ms 180000 --strictness-level 5 --validate ~/Library/Audio/Plug-Ins/Components/PluginName.component

#0	0x0000000119aab6ec in juce::ValueTree::~ValueTree() ()
#1	0x0000000119a6a5ec in juce::AudioProcessorValueTreeState::~AudioProcessorValueTreeState() ()
#2	0x0000000119bff898 in gsdsp::GSDSPAudioProcessorBase::~GSDSPAudioProcessorBase() ()
#3	0x0000000119ce5400 in GSDSPAudioProcessor::~GSDSPAudioProcessor() ()
#4	0x0000000119a52884 in JuceAU::~JuceAU() ()
#5	0x0000000119a61b40 in ausdk::ComponentBase::AP_Close(void*) ()
#6	0x0000000185dfe61c in AudioComponentInstanceDispose ()
#7	0x00000001029ec818 in juce::AudioUnitPluginInstance::cleanup() at /Users/user/code/pluginval/modules/juce/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm:908
#8	0x00000001029ec4a0 in juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() at /Users/user/code/pluginval/modules/juce/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm:887
#9	0x000000010295b37c in juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() at /Users/user/code/pluginval/modules/juce/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm:858
#10	0x000000010295b3a8 in juce::AudioUnitPluginInstance::~AudioUnitPluginInstance() at /Users/user/code/pluginval/modules/juce/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm:858
#11	0x000000010276cbbc in std::__1::default_delete<juce::AudioPluginInstance>::operator()[abi:v15006](juce::AudioPluginInstance*) const at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:48
#12	0x000000010276cb28 in std::__1::unique_ptr<juce::AudioPluginInstance, std::__1::default_delete<juce::AudioPluginInstance> >::reset[abi:v15006](juce::AudioPluginInstance*) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:305
#13	0x000000010276c97c in (anonymous namespace)::deletePluginAsync(std::__1::unique_ptr<juce::AudioPluginInstance, std::__1::default_delete<juce::AudioPluginInstance> >)::AsyncDeleter::messageCallback() at /Users/user/code/pluginval/Source/PluginTests.cpp:34
#14	0x0000000102c2a3ac in juce::MessageQueue::deliverNextMessage() at /Users/user/code/pluginval/modules/juce/modules/juce_events/native/juce_osx_MessageQueue.h:81
#15	0x0000000102c2a304 in juce::MessageQueue::runLoopCallback() at /Users/user/code/pluginval/modules/juce/modules/juce_events/native/juce_osx_MessageQueue.h:92
#16	0x0000000102c29ffc in juce::MessageQueue::runLoopSourceCallback(void*) at /Users/user/code/pluginval/modules/juce/modules/juce_events/native/juce_osx_MessageQueue.h:100
#17	0x00000001840ca63c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#18	0x00000001840ca5d0 in __CFRunLoopDoSource0 ()
#19	0x00000001840ca340 in __CFRunLoopDoSources0 ()
#20	0x00000001840c8f48 in __CFRunLoopRun ()
#21	0x00000001840c84b8 in CFRunLoopRunSpecific ()
#22	0x000000018d912c40 in RunCurrentEventLoopInMode ()
#23	0x000000018d912a7c in ReceiveNextEventCommon ()
#24	0x000000018d9127d4 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#25	0x00000001872e9d44 in _DPSNextEvent ()
#26	0x00000001872e8ee0 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#27	0x00000001872dd344 in -[NSApplication run] ()
#28	0x0000000102c1382c in juce::MessageManager::runDispatchLoop() at /Users/user/code/pluginval/modules/juce/modules/juce_events/native/juce_mac_MessageManager.mm:359
#29	0x0000000102c13700 in juce::JUCEApplicationBase::main() at /Users/user/code/pluginval/modules/juce/modules/juce_events/messages/juce_ApplicationBase.cpp:262
#30	0x0000000102c1352c in juce::JUCEApplicationBase::main(int, char const**) at /Users/user/code/pluginval/modules/juce/modules/juce_events/messages/juce_ApplicationBase.cpp:240
#31	0x00000001027491a8 in main at /Users/user/code/pluginval/Source/Main.cpp:173
#32	0x0000000183c93f28 in start ()
Screenshot 2023-06-26 at 13 29 30

Xcode 14.3.1
M1 MacBook Air
cf70a34

It does also happen with the current public release installed via brew on an Intel mac.

But this is a crash in your plugin? I.e. GSDSPAudioProcessorBase?
I'd build with Asan and symbols so you can see if there's a memory problem in your code.

Aha well spotted, thank you. I was code blind for a moment.

I didn't see the full stack in Xcode because this filter (screenshot below) was on and then it only showed up unfiltered when I copied it to paste into the issue!

Screenshot 2023-06-26 at 14 52 00