Audio Channel Numbers Exception after upgrading to JUCE 8

I have upgraded to JUCE 8 and now as soon as I run the plugin it breaks at the following assertion:

jassert (isPositiveAndBelow (channelNumber, numChannels));

It is saying the number of channels is zero.

I have declared my channels in the AudioProcessor as follows:

JucePresetManagerAudioProcessor::JucePresetManagerAudioProcessor() :
    AudioProcessor(BusesProperties()
        .withInput("Input", juce::AudioChannelSet::mono(), true)
        .withOutput("Output", juce::AudioChannelSet::stereo(), true))

This has been working all along. Any suggestions? What has changed in JUCE 8?

How are you running? As a standalone, or as a plugin in a host? If running in a host, which plugin format are you using? If you’re running the standalone, do you definitely have a valid input and output device selected?

My guess is that the assertion is saying that the plugin is being passed a buffer with no channels for some reason. I can’t think of a specific change that would have caused this, but it’s difficult to say without knowing which plugin format you’re testing, and without seeing a call stack at the point of the assertion.

Hello reuk,

You are right, the plugin is being passed a buffer with no channels for some reason. It is breaking whenever I use the methods buffer.getWritePointer (0) and buffer.getRMSLevel(0, 0, buffer.getNumSamples()) in the processBlock method of the plugins processor.

This only seems to be affecting the standalone plugin. I can run the vst3 plugin in the AudioPluginHost but before upgrading to JUCE 8 pressing the ‘Local Windows Debugger’ option with the play symbol next to it would just open the standalone plugin. Any suggestions? I would like a standalone version of the plugin as well.