# Bad Access Error when using Plugin Host

**URL:** <https://forum.juce.com/t/bad-access-error-when-using-plugin-host/59487>\
**Category:** Audio Plugins\
**Created:** [January 11, 2024, 11:57pm UTC](https://forum.juce.com/t/bad-access-error-when-using-plugin-host/59487 "2024-01-11T23:57:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BamideleAdewuyi](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@BamideleAdewuyi](https://forum.juce.com/u/BamideleAdewuyi)\
**Post date:** [January 11, 2024, 11:57pm UTC](https://forum.juce.com/t/bad-access-error-when-using-plugin-host/59487/1 "2024-01-11T23:57:32Z")

</div>

Hi,

I am trying to follow this tutorial: [https://youtu.be/PaKXRm6RZF4?si=pAcEOu8uxhCfxRsY](https://youtu.be/PaKXRm6RZF4?si=pAcEOu8uxhCfxRsY) which I realise is quite old.

At about 13:05 he compiles the code and adds the synth to the Plugin Host window. He then double clicks the plugin to bring up the GUI. When I double click mine, I am taken to a window in XCode called juce\_component and there is this error: **JUCE Message Thread (1): EXC\_BAD\_ACCESS (code=2, address=0x16f603ff8)**. It is not clear to me exactly where the problem in the code is.

I have tried to search for a solution and have found this: [https://forum.juce.com/t/juce-message-thread-1-exc-bad-access/26062](https://forum.juce.com/t/juce-message-thread-1-exc-bad-access/26062) but I do not think it is the exact same problem.

If anyone has had this happen before and can help I would really appreciate it. I am also happy to share the code, but as I said, I do not know the location of my mistake.

Any help would be much appreciated.
