Assert Hit in the JUCE Audio Processor

I’m currently trying to build a synthesizer in JUCE and hit an assert in the audio processor file when trying to open the VST in my DAW. The assert hit lies within the following function:

void AudioProcessor::validateParameter (AudioProcessorParameter* param)
{
checkForDuplicateParamID (param);
checkForDuplicateTrimmedParamID (param);

/*  If you're building this plugin as an AudioUnit, and you intend to use the plugin in
    Logic Pro or GarageBand, it's a good idea to set version hints on all of your parameters
    so that you can add parameters safely in future versions of the plugin.
    See the documentation for AudioProcessorParameter (int) for more information.
*/

#if JucePlugin_Build_AU
static std::once_flag flag;
if (wrapperType == wrapperType_Undefined || param->getVersionHint() != 0)
std::call_once (flag, { jassertfalse; });
#endif

}

Since I’m building as a VST, I’m not sure why this triggers at all. So far I have checked all of the Audio Parameter calls and ensured they had a JUCE Parameter ID, but this has had no effect on the issue.

1 Like

Sorry for not replying solution.
I have the same issue on my Xcode(the version is 15.3) since I just upgraded juce version to 7.0.11 today.
So I have tried to build audio plugin host app for checking in Xcode, then it hit jassert at “void AudioProcessor::validateParameter (AudioProcessorParameter* param)” too.

The comment explains why this happens. The juce::ParameterID object needs to be initialized with a version hint (just an integer such as 1).

So juce::ParameterID { "myId", 1 } instead of just juce::ParameterID { "myId" } or "myId".

This happens even on a VST if you also have AU enabled in the project.

1 Like

The problem got solved.
Thank you