disableNonMainBuses(); jassert

Every Juce plug-in project I’ve tried keeps hitting this jassert on run, it’s in juce_AudioProcessor.cpp. They were all working fine a few days ago.
Within this function:
void AudioProcessor::setPlayConfigDetails (const int newNumIns, const int newNumOuts, const double newSampleRate, const int newBlockSize)

The jassert hit is here:
// if the user is using this method then they do not want any side-buses or aux outputs
success &= disableNonMainBuses();
jassert (success);

I’m on Windows 7 64bit using Visual Studio 2017 and Juce v5.1.2.

Seems it could be because the plugin is set to have way too many input/output channels. Weird that it would happen on the three projects I tried and on a brand new plug-in project though.
Any thoughts?

I can’t reproduce this. Can you try the latest tip of develop and see if it still occurs?

I’ve updated to the latest version (v5.2.0). What do you mean by latest tip of develop? I create a new plugin project (or use an existing one) and that jassert gets hit. In the code, the success bool is set to false by the time it gets to the end.
bool success = true;

if (getTotalNumInputChannels()  != newNumIns)
    success &= setChannelLayoutOfBus (true,  0, AudioChannelSet::canonicalChannelSet (newNumIns));

if (getTotalNumOutputChannels() != newNumOuts)
    success &= setChannelLayoutOfBus (false, 0, AudioChannelSet::canonicalChannelSet (newNumOuts));

// if the user is using this method then they do not want any side-buses or aux outputs
success &= disableNonMainBuses();
jassert (success);

In the first if statement, numChannels is set to 0

AudioChannelSet
AudioChannelSet::canonicalChannelSet (int numChannels)
{
if (numChannels == 1) return AudioChannelSet::mono();
if (numChannels == 2) return AudioChannelSet::stereo();
if (numChannels == 3) return AudioChannelSet::createLCR();
if (numChannels == 4) returm AudioChannelSet::quadraphonic();
if (numChannels == 5) return AudioChannelSet::create5point0();
if (numChannels == 6) return AudioChannelSet::create5point1();
if (numChannels == 7) return AudioChannelSet::create7point0();
if (numChannels == 8) return AudioChannelSet::create7point1();

    return discreteChannels (numChannels);
}

This stopped happening and I have no idea why… sorry I can’t help you if you’ve stumbled on this with the same problem