# Pro Tools crashes when adding a new AAX plugin

**URL:** <https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967>\
**Category:** Audio Plugins\
**Created:** [November 3, 2017, 10:14am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967 "2017-11-03T10:14:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrahamHuang](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@GrahamHuang](https://forum.juce.com/u/GrahamHuang)\
**Post date:** [November 3, 2017, 10:14am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/1 "2017-11-03T10:14:37Z")

</div>

There are some tracks in my Pro Tools project, and I wanna insert my own plugin to each track.  
But when I inserted the plugin, pro tools suddenly crashed…  
To find out why,

1. I made a new empty plugin (I didn’t write any code) and compiled it as AAX plugin, but pro tools still crashed when I tried to insert the empty plugin…
2. I compiled it with the same code (my own plugin) on Windows, and pro tools worked pretty good…

The version of Pro Tools is 12.8.1, and JUCE is 4.3.1

Seems there are some problems about JUCE itself…Any idea?

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [November 3, 2017, 10:17am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/2 "2017-11-03T10:17:39Z")

</div>

Have you debugged it to see where it crashes?

Rail

---

<div class="post-metadata">

**Author:** ![GrahamHuang](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@GrahamHuang](https://forum.juce.com/u/GrahamHuang)\
**Post date:** [November 3, 2017, 10:41am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/3 "2017-11-03T10:41:56Z")

</div>

I chose pro tools dev as the executable app, in debug scheme.

When pro tools just started, I could see some info in xcode:  
\_2017-11-03 18:30:59.733879+0800 Pro Tools[5751:279730] WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.6 instead of 10.12.6. This is not a bug in Gestalt – it is a documented limitation. Use NSProcessInfo’s operatingSystemVersion property to get correct system version number.  
Call location:  
2017-11-03 18:30:59.733974+0800 Pro Tools[5751:279730] 0 CarbonCore 0x00007fffaacec1b1 \_\_\_Gestalt\_SystemVersion\_block\_invoke + 121  
2017-11-03 18:30:59.733999+0800 Pro Tools[5751:279730] 1 libdispatch.dylib 0x000000010153778c \_dispatch\_client\_callout + 8  
2017-11-03 18:30:59.734008+0800 Pro Tools[5751:279730] 2 libdispatch.dylib 0x000000010153776c dispatch\_once\_f + 272  
2017-11-03 18:30:59.734016+0800 Pro Tools[5751:279730] 3 CarbonCore 0x00007fffaac7a292 \_Gestalt\_SystemVersion + 976  
2017-11-03 18:30:59.734024+0800 Pro Tools[5751:279730] 4 CarbonCore 0x00007fffaac79aad Gestalt + 139  
2017-11-03 18:30:59.734032+0800 Pro Tools[5751:279730] 5 breakpad\_glue 0x000000010060a987 BreakpadGlueInit + 519  
2017-11-03 18:30:59.734040+0800 Pro Tools[5751:279730] 6 Pro Tools 0x0000000100002752 Pro Tools + 10066  
[1103/183100:ERROR:main\_delegate.cc(564)] Could not load locale pak for zh  
[warn] kq\_init: detected broken kqueue; not using.: Undefined error: 0  
[warn] kq\_init: detected broken kqueue; not using.: Undefined error: 0  
[warn] kq\_init: detected broken kqueue; not using.: Undefined error: 0  
[warn] kq\_init: detected broken kqueue; not using.: Undefined error: 0  
[1103/183101:ERROR:main\_delegate.cc(564)] Could not load locale pak for zh  
[warn] kq\_init: detected broken kqueue; not using.: Undefined error: 0  
2017-11-03 18:31:04.482528+0800 Pro Tools[5751:280463] ERROR: \_\_41-[AvidCA\_XPC InitComponent:withEndpoint:]_block\_invoke: XPC error NSCocoaErrorDomain / 4099_

And after I opened a project or create a new one, it broke at assembly code:  
\_libsystem\_kernel.dylib`\_\_pthread\_kill:  
0x7fffbfabbd38 \<+0\>: movl $0x2000148, %eax ; imm = 0x2000148  
0x7fffbfabbd3d \<+5\>: movq %rcx, %r10  
0x7fffbfabbd40 \<+8\>: syscall  
-\> 0x7fffbfabbd42 \<+10\>: jae 0x7fffbfabbd4c ; \<+20\>  
0x7fffbfabbd44 \<+12\>: movq %rax, %rdi  
0x7fffbfabbd47 \<+15\>: jmp 0x7fffbfab4caf ; cerror\_nocancel  
0x7fffbfabbd4c \<+20\>: retq  
0x7fffbfabbd4d \<+21\>: nop  
0x7fffbfabbd4e \<+22\>: nop  
0x7fffbfabbd4f \<+23\>: nop \_

then pro tools could’t go on…

---

<div class="post-metadata">

**Author:** ![GrahamHuang](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@GrahamHuang](https://forum.juce.com/u/GrahamHuang)\
**Post date:** [November 3, 2017, 10:43am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/4 "2017-11-03T10:43:29Z")

</div>

btw I used the empty plugin to debug

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [November 3, 2017, 10:54am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/5 "2017-11-03T10:54:21Z")

</div>

> [@GrahamHuang](#):
>
> JUCE is 4.3.1

We can’t help you unless you use the very latest juce version from the develop branch - the problem may already be fixed, and we can only apply fixes to the latest version.

---

<div class="post-metadata">

**Author:** ![xeneize](https://avatars.discourse-cdn.com/v4/letter/x/ce7236/32.png) [@xeneize](https://forum.juce.com/u/xeneize)\
**Post date:** [November 4, 2017, 2:09pm UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/6 "2017-11-04T14:09:27Z")

</div>

> [@AAX Crash on 4.3.1](https://forum.juce.com/t/aax-crash-on-4-3-1/24289):
>
> Ok, this is the lastest 4.x release, I know that you do not support old versions, but it is the version that I have paid and for now what I need. I do not know if I’m doing something wrong, or it’s a juce bug, but please, help. I’ve created a new plugin project auto generated by projucer (default settings and default auto generated source files) When open the plugin in protools 11 dev it crash : Thread 19 Crashed:: HL Thread 0 0 com.yourcompany.TestPlugin 0x0000000123c13498 AAXClasses::…

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [November 4, 2017, 9:23pm UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/7 "2017-11-04T21:23:54Z")

</div>

I have AAX building fine with JUCE 4.x and JUCE 5.x and the latest AAX SDK… so odds are it’s your problem (not JUCE).

Rail

---

<div class="post-metadata">

**Author:** ![GrahamHuang](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@GrahamHuang](https://forum.juce.com/u/GrahamHuang)\
**Post date:** [November 5, 2017, 4:11pm UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/8 "2017-11-05T16:11:41Z")

</div>

Anything different about Xcode settings?  
r u using default settings? Or u changed any settings manually?

---

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [November 5, 2017, 6:11pm UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/9 "2017-11-05T18:11:28Z")

</div>

I’d suggest attaching to debugger only just before you’re launching your plug-in.

In addition you should learn some how-to symbolicating and use Avid’s provided tools so you’ll get more depth about your problem from Pro Tools crash file.

Currently all our released products use AAX with JUCE 4.3.x ([https://github.com/soundradix/JUCE](https://github.com/soundradix/JUCE)) and it works just fine.

One thing that maybe @Rail_Jon_Rogut could also chime on,  
We’re not using latest AAX SDK (though I’m pretty sure it should work).

I’d also do basic sanity (though it should link if it’s broken) for Deployment Target and whether you’re using stdlib or libcpp.

---

<div class="post-metadata">

**Author:** ![jimc](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jimc/32/16067_2.png) [@jimc](https://forum.juce.com/u/jimc)\
**Post date:** [November 5, 2017, 6:40pm UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/10 "2017-11-05T18:40:21Z")

</div>

At a guess, try adding something to getStateInformation that returns a valid memory block - there was a problem with this with JUCE 4. Though I think it may only have been a crash when saving rather than inserting a plugin but it’s worth a shot. Or, as Jules suggests, try the latest version which fixes this problem.

But the best solution is to attach a debugger…

---

<div class="post-metadata">

**Author:** ![GrahamHuang](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@GrahamHuang](https://forum.juce.com/u/GrahamHuang)\
**Post date:** [December 10, 2017, 8:55am UTC](https://forum.juce.com/t/pro-tools-crashes-when-adding-a-new-aax-plugin/24967/11 "2017-12-10T08:55:10Z")

</div>

Yes it’s a version thing…  
The latest version solved the problem.  
Thanks
