Bitwig "invalid parameter ID" message VST3

I see a lot of the following warnings in the bitwig engine.log file on windows when reopening a project that was done with the same plugin build:

PluginName is misbehaving: IComponentHandler::performEdit() was called with an invalid parameter ID: 1502916324

I wonder how this can happen. I set the parameters with setValueNotifyHost(). With the latest develop build. Some parameters in the plugin are marked as not automatable. I also use parameter groups.

But the IDs should stay the same, i hope…

Did anyone notice this too?

I also get those messages with our other JUCE plugins.

I think what’s happening is that the plugin is calling performEdit (notifying the host of the changed parameter value) when the saved state is applied to the plugin. However, this happens before Bitwig first calls getParameterInfo, so at that point the host isn’t aware of any of the plugin’s parameters.

I’m not sure whether or not this is “allowed” according to the spec. I did find this quote in the docs, though:

After loading a preset, the host is responsible to rescan the parameters values (from the controller part).

This makes it sound as though the host is required to check all of the parameter values after setting a new state on the plugin, although it doesn’t imply that it’s invalid for the plugin to separately notify the host about any parameters that change during the scan.

If we really can trust the host to re-scan the parameter values after loading a new state, then I think we can probably add in a mechanism to avoid calling performEdit during a setState call.

1 Like

I’ve added a fix here that avoids sending performEdit calls while a new plugin state is being applied:

Thanks for that one. Maybe this also speeds up preset loading times in some hosts for VST3 states and VST3 presets for plugins with a lot of parameters.