We have plugin that is using JUCE_FORCE_USE_LEGACY_PARAM_IDS. During update from JUCE 5.4.7 to JUCE 6.0.7 we have encountered crash while loading VST3 plugin. It seems that new Preset Parameter is causing nullptr crash on Windows 10. Tested in Reaper and Wavelab. I think it might be correlated with this commit:
Steps to reproduce:
create new plugin project
set up JUCE_FORCE_USE_LEGACY_PARAM_IDS to “Enabled”
set up getNumPrograms() in PluginProcessor to return more than 1 program
I have changed in VST3 Wrapper in line 1078 comparison from JuceAudioProcessor::paramPreset to last parameter. For example in plugin that has 47 parameters in total (with preset parameter and bypass parameter) to 46. In minimal project that I have created to extract issue I have changed it to 1. It is helping to load project, but I don’t know if it is not messing with something else. I hope it will help to reproduce and fix that bug.
Thank you @ed95 for fast reply and fixing that.
Unfortunately I have more complicated example that still is not working properly. Adding bypass parameter inside PluginProcessor is causing wrong parameter calculation and is still crashing.
I am using juce 6.0.8. Crash is happening in juce_VST3_Wrapper.cpp in line 527. AudioProcessor is showing that bypassParamID and programParamID are both set to 0. I think programParamID is calculated incorrectly while PluginProcessor is providing bypassParameter. Could you check this as well?