Bad Array Access for inputBuses (for sidechain plug-in) - Bug in AAX Wrapper?


I believe I found a bug in the juce_AAX_Wrapper.cpp file at line 1346 in the latest develop. When checking the validity of layouts that include sidechain inputs, there’s a loop through through the inputBuses that tries to access an outputBus at each index, at least triggering an assertion. I had found this using the DigiShell as the scheme executable in Xcode.

if (numInputBuses > 1)

    for (int i = 2; i < numInputBuses; ++i)
        if (currentLayout.outputBuses.getReference (i) != AudioChannelSet::disabled()) //<-- should be currentLayout.inputBuses?
                        return foundValid;
  • Frye (Ben Kelley)

Thanks for reporting this issue. It looks to me like this loop is probably supposed to be accessing the inputBuses array rather than the outputBuses array. As far as I can tell, currentLayout contains a layout supported by the processor. This code is trying to ensure that all input buses other than the main input and the sidechain input are disabled.

This issue should be fixed by this commit: