VST crashing in Maschine 2 on some multi-bus configurations


#1
Hi,

If I modify the MultiOutSynth example to have 1 main output and 1 mono aux bus:

MultiOutSynth()
    : AudioProcessor (BusesProperties()
                      .withOutput ("Output",  AudioChannelSet::stereo(), true)
                      .withOutput ("Aux",  AudioChannelSet::mono(), false)
                     )

Then the resulting VST2 plugin will crash in Maschine when loaded – the crash happens on a null pointer dereference for the third channel in internalProcessReplacing :
FloatVectorOperations::clear (chan, numSamples);
with ‘chan’ being 0 for the last channel.

If seems to be caused by the odd number of channels, if I replace the mono bus by a stereo bus, the crash is gone. I’m not sure if it is an issue in the juce vst wrapper or an issue in maschine, though.


#2

Hi @jpo,

Can you test this again (I don’t have Maschine 2) with the latest fix on develop?

Thanks!

Fabian


#3

Hi Fabian,

It is still crashing, now at line 496:

* thread #37, name = 'com.apple.audio.IOThread.client', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fffc5d51f9c libsystem_platform.dylib`_platform_memmove$VARIANT$Haswell + 252
    frame #1: 0x000000011d20d58a MultiOutSynth`void JuceVSTWrapper::internalProcessReplacing<float>(this=0x0000000113045c00, inputs=0x00007000029f1650, outputs=0x00007000029f1650, numSamples=128, tmpBuffers=0x0000000113045d88) at juce_VST_Wrapper.cpp:496
    frame #2: 0x000000011d20cf35 MultiOutSynth`JuceVSTWrapper::processReplacing(this=0x0000000113045c00, inputs=0x00007000029f1650, outputs=0x00007000029f1650, sampleFrames=128) at juce_VST_Wrapper.cpp:547
    frame #3: 0x000000011d202f53 MultiOutSynth`JuceVSTWrapper::processReplacingCB(vstInterface=0x0000000113045c58, inputs=0x00007000029f1650, outputs=0x00007000029f1650, sampleFrames=128) at juce_VST_Wrapper.cpp:552
    frame #4: 0x0000000101202fc7 Maschine 2`NI::HOSTING::VSTProcessing::process(NI::AB::EventBuffer&) + 599
    frame #5: 0x0000000100cfe7fe Maschine 2`NI::MASCOMMON::RT::PluginProcessor::processAudioBuffers(NI::ML::AE::ProcessInfo const&, NI::ML::AE::ProcessData const&) + 862

adding an ’if (outputs[i]) inside the
if (const FloatType* const chan = tmpBuffers.tempChannels.getUnchecked(i))

Seems to solve that, and then everything seems to work !


#4

OK, I’ve added this to develop. Thank you for reporting.