Here with another extremely niche and perplexing bug!
Two users, one on MacOS Sonoma and one on Monterey, one using Ableton Live 12 and the other using Ableton Live 11, reported that the plugin wouldn’t restore its state when saving and reloading a Live Set - it would just go back to the default settings every time. Obviously a pretty terrible bug that I want to get fixed right away. So I got one of them (the one on Sonoma using Live 12) to install a debug build and send me the log files.
The logs show that both getStateInformation and setStateInformation are working exactly as expected. I asked them to open up a clean Live Set with one plugin instance, change one knob, and then save the file and try to reopen it - and I can see exactly which knob they changed. getStateInformation saves the parameter state to an xml and copies it to binary using copyXmlToBinary (*xml, destData), and setStateInformation correctly retrieves that xml using getXmlFromBinary (data, sizeInBytes). Just looking at the logs, it looks like nothing is wrong.
Except then I noticed something in the logs, just when reloading the set, that I’d never seen before: a warning directly from macOS stating
WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
Given that this deals with something called a secureRestorableState, it seems like it might have to do with this state-retrieval issue. Searching online reveals that others using completely unrelated programs have also had this warning, but usually with no effect.
The user also received another warning, just after setStateInformation was successfully called and the state was (seemingly) successfully retrieved:
error: VST2: Failed to load plugin: Plugin doesn't have a main function
…which is strange, because the plugin is a VST3. The only thing I can think of is that perhaps this user has some other VST2 on their default set that’s making this error show up. So my best guess is that the secureRestorableState thing is somehow interfering with the plugin state retrieval. Or maybe this is just a red herring.
Anyone have any idea what could be going on? The plugin was built with JUCE 7.0.9.
Thanks!
