Audio Plugin Host suddenly crashing

SOLVED – See my reply below

Hi all,
I’d been using the Audio Plugin Host with no problems (JUCE 6.0.1 MacOS Catalina) but suddenly it started crashing as soon as I run it. I tried rebooting, I rebuilt the Audio Plugin Host from scratch, it still crashes and the error looks really bad:

JUCE Message Thread (1): EXC_BAD_ACCESS (code=1, address=0x160)

Any idea how to fix this? It’s really frustrating at the moment…
Stacktrace below.
Thanks for any help!
Bil

  • thread #1, name = ‘JUCE Message Thread’, queue = ‘com.apple.main-thread’, stop reason = EXC_BAD_ACCESS (code=1, address=0x160)
    frame #0: 0x0000000115b841ca A1Starterfloat std::__1::__cxx_atomic_load<float>(__a=0x0000000000000160, __order=memory_order_seq_cst) at atomic:970:12 frame #1: 0x0000000115b8414e A1Starterstd::__1::__atomic_base<float, false>::load(this=0x0000000000000160, __m=memory_order_seq_cst) const at atomic:1487:17
    frame #2: 0x0000000115b8412a A1Starterstd::__1::__atomic_base<float, false>::operator float(this=0x0000000000000160) const at atomic:1491:53 frame #3: 0x0000000115b8362e A1Starterjuce::AudioParameterFloat::operator float(this=0x0000000000000000) const at juce_AudioParameterFloat.h:82:58
    frame #4: 0x0000000115b835cd A1StarterA1StarterAudioProcessor::getStateInformation(this=0x0000000102f21910, destData=0x00007ffeefbfd010) at PluginProcessor.cpp:192:59 frame #5: 0x0000000115b480c5 A1Starterjuce::JuceVST3Component::getStateInformation(this=0x0000000102f215a0, destData=0x00007ffeefbfd010) at juce_VST3_Wrapper.cpp:1899:25
    frame #6: 0x0000000115b3891f A1Starter`juce::JuceVST3Component::getState(this=0x0000000102f215a0, state=0x00007ffeefbfd080) at juce_VST3_Wrapper.cpp:2166:9
    • frame #7: 0x00000001002b1522 AudioPluginHostjuce::VST3PluginInstance::synchroniseStates(this=0x0000000103840400) at juce_VST3PluginFormat.cpp:2834:32 frame #8: 0x00000001002b0a7c AudioPluginHostjuce::VST3PluginInstance::initialise(this=0x00007ffeefbfd128)::‘lambda’()::operator()() const at juce_VST3PluginFormat.cpp:1973:13
      frame #9: 0x000000010024e37b AudioPluginHostjuce::VST3PluginInstance::initialise(this=0x0000000103840400) at juce_VST3PluginFormat.cpp:1977:9 frame #10: 0x000000010024dc5d AudioPluginHostjuce::VST3PluginFormat::createPluginInstance(this=0x000060000024dc20, description=0x00007ffeefbfd7f0, (null)=44100, (null)=512, callback=juce::AudioPluginFormat::PluginCreationCallback @ 0x00007ffeefbfd390)>) at juce_VST3PluginFormat.cpp:3341:31
      frame #11: 0x000000010020f8ff AudioPluginHostjuce::AudioPluginFormat::createInstanceFromDescription(this=0x000060000024dc20, desc=0x00007ffeefbfd7f0, initialSampleRate=44100, initialBufferSize=512, errorMessage=0x00007ffeefbfd7d0) at juce_AudioPluginFormat.cpp:65:9 frame #12: 0x00000001002105e1 AudioPluginHostjuce::AudioPluginFormatManager::createPluginInstance(this=0x000000010780f3a8, description=0x00007ffeefbfd7f0, rate=44100, blockSize=512, errorMessage=0x00007ffeefbfd7d0) const at juce_AudioPluginFormatManager.cpp:96:24
      frame #13: 0x00000001000eb981 AudioPluginHostPluginGraph::createNodeFromXml(this=0x000000010460f1c0, xml=0x0000600000c9aaf0) at PluginGraph.cpp:388:39 frame #14: 0x00000001000eada3 AudioPluginHostPluginGraph::restoreFromXml(this=0x000000010460f1c0, xml=0x0000600000c99a10) at PluginGraph.cpp:466:9
      frame #15: 0x00000001000eabdf AudioPluginHostPluginGraph::loadDocument(this=0x000000010460f1c0, file=0x00007ffeefbfdc40) at PluginGraph.cpp:220:9 frame #16: 0x0000000100876107 AudioPluginHostjuce::FileBasedDocument::loadFrom(this=0x000000010460f1c0, newFile=0x00007ffeefbfdc40, showMessageOnFailure=true, showWaitCursor=true) at juce_FileBasedDocument.cpp:83:18
      frame #17: 0x0000000100126c6e AudioPluginHostPluginHostApp::handleAsyncUpdate(this=0x0000600003701200) at HostStartup.cpp:101:30 frame #18: 0x000000010053635b AudioPluginHostjuce::AsyncUpdater::AsyncUpdaterMessage::messageCallback(this=0x00006000002484e0) at juce_AsyncUpdater.cpp:34:19
      frame #19: 0x000000010053f393 AudioPluginHostjuce::MessageQueue::deliverNextMessage(this=0x000060000290c700) at juce_osx_MessageQueue.h:82:30 frame #20: 0x000000010053f2e6 AudioPluginHostjuce::MessageQueue::runLoopCallback(this=0x000060000290c700) at juce_osx_MessageQueue.h:93:19
      frame #21: 0x000000010053f1b8 AudioPluginHostjuce::MessageQueue::runLoopSourceCallback(info=0x000060000290c700) at juce_osx_MessageQueue.h:101:44 frame #22: 0x00007fff37ce4d52 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
      frame #23: 0x00007fff37ce4cf1 CoreFoundation__CFRunLoopDoSource0 + 103 frame #24: 0x00007fff37ce4b0b CoreFoundation__CFRunLoopDoSources0 + 209
      frame #25: 0x00007fff37ce383a CoreFoundation__CFRunLoopRun + 927 frame #26: 0x00007fff37ce2e3e CoreFoundationCFRunLoopRunSpecific + 462
      frame #27: 0x00007fff3690fabd HIToolboxRunCurrentEventLoopInMode + 292 frame #28: 0x00007fff3690f6f4 HIToolboxReceiveNextEventCommon + 359
      frame #29: 0x00007fff3690f579 HIToolbox_BlockUntilNextEventMatchingListInModeWithFilter + 64 frame #30: 0x00007fff34f55039 AppKit_DPSNextEvent + 883
      frame #31: 0x00007fff34f53880 AppKit-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 frame #32: 0x00007fff34f4558e AppKit-[NSApplication run] + 658
      frame #33: 0x0000000100529b15 AudioPluginHostjuce::MessageManager::runDispatchLoop(this=0x0000600000c50e70) at juce_mac_MessageManager.mm:343:13 frame #34: 0x00000001005299eb AudioPluginHostjuce::JUCEApplicationBase::main() at juce_ApplicationBase.cpp:262:40
      frame #35: 0x000000010052980c AudioPluginHostjuce::JUCEApplicationBase::main(argc=3, argv=0x00007ffeefbff488) at juce_ApplicationBase.cpp:240:16 frame #36: 0x0000000100126223 AudioPluginHostmain(argc=3, argv=0x00007ffeefbff488) at HostStartup.cpp:155:1
      frame #37: 0x00007fff71d79cc9 libdyld.dylibstart + 1 frame #38: 0x00007fff71d79cc9 libdyld.dylibstart + 1

I managed to fix the problem. The Audio Plugin Host was loading a “bad” plugin that was causing it to crash. In case it is of interest, what happened is I tried to change the dimensions of the GUI in the Editor constructor and mistyped as in:

setSize (400, 00);

Somehow I managed to not notice the typo. The plugin compiles ok but crashes the host when loaded.
Deleting the plugin, fixing the error, and recompiling it fixes the problem.
Cheers,
Bil

1 Like