When I update a plugin with new parameters I always add the new parameters to the end of the parameter enum list. That approach has been working everywhere I’ve tested it (even Pro Tools and Logic) on both Mac and Windows but I just discovered it does not work in FL Studio 20 with VST2 builds.
When I open an existing project in FL Studio with the new plugin version installed, the plugin loads unspecified values for the new parameters instead of the default values. Checking plugin load with debugger shows that “UnserializeParams” gets called numerous times. One time through it loads the correct values - the next time through it loads some other values - then repeats toggling between those two sets of values until it finally completes with the wrong values for the new parameters. Each time it loads the wrong values they are the same values - i.e., they are not “random” values - so it’s getting these values from somewhere but they are not the default values nor in any preset. All the previously existing parameters load correctly.
When I test that same plugin in Reaper it shows “UnserializeParams” is called only once - and it loads the proper default values for the new parameters as expected.
FL Studio is the only DAW where I have seen this happen (i.e., plugin fails to load default values for new parameters). Oddly, VST3 and AU versions work properly.
Is this a known bug in FL Studio - or some problem in the plugin? If it’s a plugin problem, is there a fix/workaround/hack to force loading of default values for the new parameters in FL Studio?
Any advice/experience with this much appreciated!
UPDATE: seems there may be an issue with default “chunk” handling in IPlugVST2.cpp as possibly related issue here: https://github.com/iPlug2/iPlug2/issues/785