Had this on my backlog for a while and decided to have a go finally. And it’s interesting! It looks like we have two quite different bugs here.
First of all, I created a minimal example:
CMakeLists.txt (1.3 KB)
PluginProcessor.cpp (4.3 KB)
It just has three bool and two choice parameters. Originally the sequence was bools first, then choices (will be important later on). The uploaded version has the choices first.
First the Audio Unit plugin:
- I’m running pluginval (current develop, unmodified JUCE) with strictness 10 and 10 repeats, as the error doesn’t always occur.
- With current JUCE develop, the state restore test fails occasionally, and all three bool parameters are affected. The choice parameters are not affected.
- With the proposed change (modifying setValue() so it can only set to 0 or 1), the problem disappears completely. The change here is only applied to the plugin’s JUCE, not pluginval’s!
Now the interesting part, the VST3 plugin:
- Again pluginval with strictness 10 and 10 repeats
- The state restore test fails much more rarely, and interestingly it only fails for the first bool parameter.
- Making the proposed change to the plugin’s JUCE makes no difference
- Making the proposed change to pluginval’s JUCE makes no difference either!
- Putting the choice parameters first results in the test failing for the first choice parameter only!
- Adding a float parameter at the beginning of the parameter list makes the errors go away.
- Giving the float parameter an interval so it has e.g. 5 steps does not trigger the error (after all I would have expected that, but also in the log I see that for the stepped float parameter, 2147483647 steps are reported, which is wrong and probably yet another bug?).
So it’s definitely (at least) two problems we’re dealing with here, and the second one doesn’t seem related to the first at all.
I’m confused and hungry now.
