JUCE Assertion failure in juce_AudioProcessor.cpp:691


#1

I’ve made a plugin and am now trying to run it on iOS. The plugin works as a VST and AU, and it almost works as an iOS app, but after successfully building the app Xcode spits out:

JUCE v5.0.2
JUCE Assertion failure in juce_AudioProcessor.cpp:691

This line is the reset() function, which is overridden in my own processor. I thought the problem might be that my IIRFilters were not being reset, but that is not the issue. Also, I can open the app on my device after getting this error, but I am unable to use the app as interapp audio effect (fails to load/crashes garageband)t, which I assume is related to this JUCE error. I am not sure what is going on since the program works fine as a plugin. I would rather not include code, as I would have to include the entire project, but if anyone has any possible solutions/pointers, they will be greatly appreciated.


#2

You’re going to have to include a bit of code before anyone here can be any help, at the very least the line containing the failed assertion.


#3

The line containing the failed assertion is:

void AudioProcessor::reset() {}

As I said before, this is overridden in my plugin’s processor. I tried not overriding the reset function, overriding and leaving it blank, and I also have tried reseting all of my IIRFilters, but all of these result in the same JUCE assertion failure. I would have to include everything to really get to the problem, so I was hoping that someone else may have had problems with their reset function and figured out how to fix it. I’m not even sure how to debug it.


#4

You seem a bit confused… AudioProcessor::reset() is not at line 691, and obviously isn’t an assertion. Maybe the source file you’re looking at isn’t the same one you’re actually building?

Make sure you pull the latest code from develop, clean up your folders, and get things into a consistent state so you can see what’s going on.


#5

Thanks for the reply Jules.

I am admittedly confused, but to prove my sanity I included a screen shot of Xcode providing this. Again, I apologize for not providing all of my code and whatnot, and I understand if this error doesn’t seem to make sense. I will try cleaning everything up and getting the latest version and report back.


#7

Ok, so it was definitely a matter of needing to clean. I think the suspect is parameters having the same ID?

// check that no two parameters have the same id
#ifdef JUCE_DEBUG
auto paramId = getParameterID (p->parameterIndex);

for (auto q : managedParameters)
    jassert (q == nullptr || q == p || paramId != getParameterID (q->parameterIndex));
#endif

I had not run into this issue before, but now I will be more particular with the naming of my parameters. Sorry for the false flag!