AAX Crash on 4.3.1


#1

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::JuceAAX_Processor::algorithmCallback(AAXClasses::JUCEAlgorithmContext* const*, void const*) + 168 (juce_AAX_Wrapper.cpp:1515)
1   com.yourcompany.TestPlugin    	0x0000000123bf989d AAXClasses::algorithmProcessCallback(AAXClasses::JUCEAlgorithmContext* const*, void const*) + 29 (juce_AAX_Wrapper.cpp:1916)
2   com.avid.framework.AAXHost    	0x0000000118f9dba7 AAXH_CComponentNative::RenderAudio(int, float const**, int, float**, int, long long, long long) + 1783
3   com.avid.framework.AAXHost    	0x0000000118f8aa73 AAXH_CPlugIn::RenderAudio(float const* const*, int, float* const*, int, int, long long, long long) + 1133
4   com.avid.framework.AAE        	0x00000001120f3bff CAAXEffectInstance::AAXWorkerCallback(void*, SPlugInRTGlobals*) + 189
5   com.avid.framework.AAE        	0x000000011212da11 CHostWorkerEngine::ExecuteWorkerChain(CWorkerChain*, CProcessingThread*) + 439
6   com.avid.framework.AAE        	0x00000001121305fa CHostWorkerEngine::ProcessLoop(CProcessingThread*) + 446
7   com.avid.framework.AAE        	0x00000001120a8e93 CSimpleThread::StaticThreadProc(void*, IPSThread*) + 15
8   com.digidesign.framework.PlatformSupport	0x000000010c8ca9d3 CTask_Imp::MacOSXMasterThreadProc(void*) + 115
9   libsystem_pthread.dylib       	0x00007fff8ab2ec13 _pthread_body + 131
10  libsystem_pthread.dylib       	0x00007fff8ab2eb90 _pthread_start + 168
11  libsystem_pthread.dylib       	0x00007fff8ab2c375 thread_start + 13

Base SDK: 10.11, deployment target: 10.8
C++11, LLVM libc++
Thanks!

EDIT: More info:
Process: Pro Tools [6022]
Path: /Applications/Audio/Pro Tools Dev 11.app/Contents/MacOS/Pro Tools
Identifier: com.avid.ProTools
Version: 11.2.0.23 (11.2.0d23)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Pro Tools [6022]
User ID: 502

Date/Time:             2017-09-20 15:56:04.803 -0300
OS Version:            Mac OS X 10.11.3 (15D21)
Report Version:        11
Anonymous UUID:        xxx

Sleep/Wake UUID:       xxx

Time Awake Since Boot: 24000 seconds
Time Since Wake:       340 seconds

System Integrity Protection: enabled

Crashed Thread:        25  HL Thread 3

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Pro Tools crashes when adding a new AAX plugin
#2

Have you debugged it to see where it crashes???

Rail


#3

for some reason i cannot debug protools, but the crash report says: juce_AAX_Wrapper.cpp:1515

static void algorithmCallback (JUCEAlgorithmContext* const instancesBegin[], const void* const instancesEnd)
{

    for (JUCEAlgorithmContext* const* iter = instancesBegin; iter < instancesEnd; ++iter)
    {
        const JUCEAlgorithmContext& i = **iter;

        int sideChainBufferIdx = i.pluginInstance->parameters.hasSidechain && i.sideChainBuffers != nullptr
                                     ? static_cast<int> (*i.sideChainBuffers) : -1;

        // sidechain index of zero is an invalid index
        if (sideChainBufferIdx <= 0)
            sideChainBufferIdx = -1;
        // Here what causes the crash:
        float* const meterTapBuffers = (i.meterTapBuffers != nullptr ? *i.meterTapBuffers : nullptr); // Line 1515, crash

        i.pluginInstance->parameters.process (i.inputChannels, i.outputChannels, sideChainBufferIdx,
                                              *(i.bufferSize), *(i.bypass) != 0,
                                              getMidiNodeIn(i), getMidiNodeOut(i),
                                              meterTapBuffers);
    }
}

#4

Use the fix from the latest version:

const int numMeters = i.pluginInstance->parameters.aaxMeters.size();
float* const meterTapBuffers = (i.meterTapBuffers != nullptr && numMeters > 0 ? *i.meterTapBuffers : nullptr);

#5

In case you are not doing it like that, please remember that you should be attaching to the Pro Tools executable after you have launched it.

Launching Pro Tools directly from Xcode will not work.


#6

Thank you :slight_smile:


#7

I’ve set meterTapBuffers to nullptr, to avoid licensing problems.
Anyways I will buy the new JUCE soon
Thanks!


#8

I’m having a bit of a dizzy moment with GIT. Which versions of JUCE do not have this bug?


#9

Thx !!!