In my current project, I’m using AudioProcessorValueTreeState to store several parameters. I have a float pointer for each. For one of my parameters, I had a typo in the parameter’s string name in my call to getRawParameterValue() when running a line like this:
float* paramListener = (float*)(tree.getRawParameterValue("nameWithTypo"));
and this caused my plugin to crash the AudioPluginHost when attempting to scan for new plugins. It took me a little while to find the source of the error, because the crash report I was getting read “Pointer being realloc’d was not allocated”, so the error wasn’t obvious to me…
Yes, this was obviously my error, but my suggestion is that it might be possible to have Juce throw a compiler warning, or something of the sort, for things like this (asking APVTS to retrieve the value of a nonexistent parameter) instead of allowing the plugin to build and then crash…? Or perhaps a more descriptive crash message if this is the source of the abort? I know almost nothing about library creation, so apologies if this is a dumb suggestion or anything, I was just thinking this might save someone else some grief down the line.