BR: possible APVTS bug

When conducting a pluginval test with strictness level 10, restoration of first parameter in APVTS fails sporadically, resulting in the first parameter occasionally receiving incorrect values.

Results of testing AudioProcessorValueTreeStateTutorial project

Starting tests in: pluginval / Plugin state restoration...
!!! Test 1 failed: Gain not restored on setStateInformation -- Expected value  within 0.1 of: 0.583364, Actual value: 0.75
FAILED!!  1 test failed, out of a total of 2
1 Like

Do you have the ā€˜randomise tests’ feature enabled in pluginval? There may be a bug in pluginval that could cause this, as discussed in this thread:

Yep, that’s been bugging me for a while too. I described the problem here (including possible fixes):

It affects both AudioParameterBool and AudioParameterChoice. If I’m not mistaken, to really get rid of the error, the fix needs to be applied to both the plugin and pluginval itself.

Edit: just noticed it’s not about a bool or choice, so it’s probably a different bug. Nevermind. :wink:

Is there any place in your code where you set the value of the gain parameter? If so, could this happen during state storing or restoring?
If affected by another parameter, did you flag this other parameter as a meta-parameter (that can change other parameters)? If not, auval will fail anyways.

Yes. The failure seems to be directly related to ā€˜Randomize Tests’ being enabled. So this is probably a pluginval bug?

If you’re confident that you’re not encountering any other issues mentioned in this thread or other state-specific problems, then this is likely the cause. You can try running pluginval without randomized tests to see if the problem still occurs intermittently.

Yes, I’m now quite confident it’s the randomise option. Testing with the simple APVTS tutorial project.