# \[SOLVED\] Pro Tools APVTS Crash

**URL:** <https://forum.juce.com/t/solved-pro-tools-apvts-crash/33846>\
**Category:** Audio Plugins\
**Created:** [June 11, 2019, 7:18pm UTC](https://forum.juce.com/t/solved-pro-tools-apvts-crash/33846 "2019-06-11T19:18:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alassandro](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/alassandro/32/4297_2.png) [@alassandro](https://forum.juce.com/u/alassandro)\
**Post date:** [June 11, 2019, 7:18pm UTC](https://forum.juce.com/t/solved-pro-tools-apvts-crash/33846/1 "2019-06-11T19:18:23Z")

</div>

Wondering if anyone has run into this before… we use `AudioProcessorValueTreeState` for our parameters, we’re on JUCE 5.4.3 (master).

When loading up our plugin as a regular plugin and then an AudioSuite plugin (both windows open) in Pro Tools 2018.7 we experience a crash with the `ParameterAdapter` class inside the APVTS implementation. Specifically it crashes on:

> <https://github.com/WeAreROLI/JUCE/blob/master/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp#L152>

In lldb it seemed like perhaps the parameter reference was invalid, but this doesn’t happen consistently…

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [June 12, 2019, 12:01pm UTC](https://forum.juce.com/t/solved-pro-tools-apvts-crash/33846/2 "2019-06-12T12:01:31Z")

</div>

Is it possible that you have a dangling listener somewhere? Maybe you registered a listener, but forgot to remove the listener when it was destructed.

---

<div class="post-metadata">

**Author:** ![alassandro](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/alassandro/32/4297_2.png) [@alassandro](https://forum.juce.com/u/alassandro)\
**Post date:** [June 12, 2019, 8:21pm UTC](https://forum.juce.com/t/solved-pro-tools-apvts-crash/33846/3 "2019-06-12T20:21:29Z")

</div>

That was exactly it, thanks for the direction 🙂

I had my proper `removeListener()` calls in place, however there was a separate bit of logic that was accidentally clearing out the array storing all the listeners to remove… oops!
