secureRestorableState

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!

Just had this error pop up as well. Did you solve the issue?

Hello! So in regards to the “Plugin doesn’t have a main function” issue (which conveniently enough is the only google search result for this issue so far): I am also encountering this issue but in a different way. I have a few VST2s that I need to use for opening older projects (in particular, Native Instruments Replika XT and ArtsAcoustic Reverb). However, with Ableton Live 12.0.25 and 12.1.1 (installed on MacOS Sequoia 15.1), I encounter the same problem with the main function error on plugin scan. Were you able to identify what the root cause of the issue is (and if so, what a fix would be for it)?

I don’t think it’s an issue with the plugin signature as I renamed the CodeResources directory and a different error in plugin scanning occurred (“”) on a hard re-scan.

One last thing to note is that when opening Ableton in Rosetta mode, it is able to recognize the plugin. I would strongly prefer not to do this as I would miss out on performance, and would like to use VST2 over AU in case I ever need to open a project on Windows.

Thanks!