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](https://private-user-images.githubusercontent.com/143631/248780989-e13bd303-9c9e-4fd9-bf91-9140b1a0db6f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NjEyNjAsIm5iZiI6MTcyMTg2MDk2MCwicGF0aCI6Ii8xNDM2MzEvMjQ4NzgwOTg5LWUxM2JkMzAzLTljOWUtNGZkOS1iZjkxLTkxNDBiMWEwZGI2Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNFQyMjQyNDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMjQzNmJjODdjMzhkNTFlZTZlYmFjNmNhOWYzM2U1MDJlMDFjZTBhYjY4NWZhYmI1NzUyM2I5NmE2YjNmODEyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.AVPA3MtNE5QpxPCwe86UPiwE6kov9i-LtKXiHO_RB1k)
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.