# Audio Plugin Host suddenly crashing

**URL:** <https://forum.juce.com/t/audio-plugin-host-suddenly-crashing/41801>\
**Category:** General JUCE discussion\
**Created:** [September 18, 2020, 12:08am UTC](https://forum.juce.com/t/audio-plugin-host-suddenly-crashing/41801 "2020-09-18T00:08:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oumpaxikis](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@oumpaxikis](https://forum.juce.com/u/oumpaxikis)\
**Post date:** [September 18, 2020, 12:08am UTC](https://forum.juce.com/t/audio-plugin-host-suddenly-crashing/41801/1 "2020-09-18T00:08:42Z")

</div>

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 A1Starter`float std:: __1::__ cxx_atomic_load<float>( __a=0x0000000000000160,__ order=memory_order_seq_cst) at atomic:970:12 frame #1: 0x0000000115b8414e A1Starter`std::\_\_1::\_\_atomic\_base\<float, false\>::load(this=0x0000000000000160, \_\_m=memory\_order\_seq\_cst) const at atomic:1487:17  
frame #2: 0x0000000115b8412a A1Starter`std:: __1::__ atomic_base<float, false>::operator float(this=0x0000000000000160) const at atomic:1491:53 frame #3: 0x0000000115b8362e A1Starter`juce::AudioParameterFloat::operator float(this=0x0000000000000000) const at juce\_AudioParameterFloat.h:82:58  
frame #4: 0x0000000115b835cd A1Starter`A1StarterAudioProcessor::getStateInformation(this=0x0000000102f21910, destData=0x00007ffeefbfd010) at PluginProcessor.cpp:192:59 frame #5: 0x0000000115b480c5 A1Starter`juce::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 AudioPluginHost`juce::VST3PluginInstance::synchroniseStates(this=0x0000000103840400) at juce_VST3PluginFormat.cpp:2834:32 frame #8: 0x00000001002b0a7c AudioPluginHost`juce::VST3PluginInstance::initialise(this=0x00007ffeefbfd128)::‘lambda’()::operator()() const at juce\_VST3PluginFormat.cpp:1973:13  
frame #9: 0x000000010024e37b AudioPluginHost`juce::VST3PluginInstance::initialise(this=0x0000000103840400) at juce_VST3PluginFormat.cpp:1977:9 frame #10: 0x000000010024dc5d AudioPluginHost`juce::VST3PluginFormat::createPluginInstance(this=0x000060000024dc20, description=0x00007ffeefbfd7f0, (null)=44100, (null)=512, callback=juce::AudioPluginFormat::PluginCreationCallback @ 0x00007ffeefbfd390)\>) at juce\_VST3PluginFormat.cpp:3341:31  
frame #11: 0x000000010020f8ff AudioPluginHost`juce::AudioPluginFormat::createInstanceFromDescription(this=0x000060000024dc20, desc=0x00007ffeefbfd7f0, initialSampleRate=44100, initialBufferSize=512, errorMessage=0x00007ffeefbfd7d0) at juce_AudioPluginFormat.cpp:65:9 frame #12: 0x00000001002105e1 AudioPluginHost`juce::AudioPluginFormatManager::createPluginInstance(this=0x000000010780f3a8, description=0x00007ffeefbfd7f0, rate=44100, blockSize=512, errorMessage=0x00007ffeefbfd7d0) const at juce\_AudioPluginFormatManager.cpp:96:24  
frame #13: 0x00000001000eb981 AudioPluginHost`PluginGraph::createNodeFromXml(this=0x000000010460f1c0, xml=0x0000600000c9aaf0) at PluginGraph.cpp:388:39 frame #14: 0x00000001000eada3 AudioPluginHost`PluginGraph::restoreFromXml(this=0x000000010460f1c0, xml=0x0000600000c99a10) at PluginGraph.cpp:466:9  
frame #15: 0x00000001000eabdf AudioPluginHost`PluginGraph::loadDocument(this=0x000000010460f1c0, file=0x00007ffeefbfdc40) at PluginGraph.cpp:220:9 frame #16: 0x0000000100876107 AudioPluginHost`juce::FileBasedDocument::loadFrom(this=0x000000010460f1c0, newFile=0x00007ffeefbfdc40, showMessageOnFailure=true, showWaitCursor=true) at juce\_FileBasedDocument.cpp:83:18  
frame #17: 0x0000000100126c6e AudioPluginHost`PluginHostApp::handleAsyncUpdate(this=0x0000600003701200) at HostStartup.cpp:101:30 frame #18: 0x000000010053635b AudioPluginHost`juce::AsyncUpdater::AsyncUpdaterMessage::messageCallback(this=0x00006000002484e0) at juce\_AsyncUpdater.cpp:34:19  
frame #19: 0x000000010053f393 AudioPluginHost`juce::MessageQueue::deliverNextMessage(this=0x000060000290c700) at juce_osx_MessageQueue.h:82:30 frame #20: 0x000000010053f2e6 AudioPluginHost`juce::MessageQueue::runLoopCallback(this=0x000060000290c700) at juce\_osx\_MessageQueue.h:93:19  
frame #21: 0x000000010053f1b8 AudioPluginHost`juce::MessageQueue::runLoopSourceCallback(info=0x000060000290c700) at juce_osx_MessageQueue.h:101:44 frame #22: 0x00007fff37ce4d52 CoreFoundation` **CFRUNLOOP\_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 CoreFoundation`CFRunLoopRunSpecific + 462  
frame #27: 0x00007fff3690fabd HIToolbox`RunCurrentEventLoopInMode + 292 frame #28: 0x00007fff3690f6f4 HIToolbox`ReceiveNextEventCommon + 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 AudioPluginHost`juce::MessageManager::runDispatchLoop(this=0x0000600000c50e70) at juce_mac_MessageManager.mm:343:13 frame #34: 0x00000001005299eb AudioPluginHost`juce::JUCEApplicationBase::main() at juce\_ApplicationBase.cpp:262:40  
frame #35: 0x000000010052980c AudioPluginHost`juce::JUCEApplicationBase::main(argc=3, argv=0x00007ffeefbff488) at juce_ApplicationBase.cpp:240:16 frame #36: 0x0000000100126223 AudioPluginHost`main(argc=3, argv=0x00007ffeefbff488) at HostStartup.cpp:155:1  
frame #37: 0x00007fff71d79cc9 libdyld.dylib`start + 1 frame #38: 0x00007fff71d79cc9 libdyld.dylib`start + 1

---

<div class="post-metadata">

**Author:** ![oumpaxikis](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@oumpaxikis](https://forum.juce.com/u/oumpaxikis)\
**Post date:** [September 18, 2020, 2:00pm UTC](https://forum.juce.com/t/audio-plugin-host-suddenly-crashing/41801/2 "2020-09-18T14:00:08Z")

</div>

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
