Closed x42 closed 3 years ago
Also may be related: https://github.com/sadko4u/lsp-plugins/issues/120
I don't think the linked commit (which only removes fewer files) is the root of this, or that it's related to the above LSP issue.
Deleting state then saving it again like this can not work, because plugins can save files when their state is saved (which happens at lilv_state_new_from_instance()
or similar, not lilv_state_save()
. So, what Ardour is doing is (potentially) deleting state (real, actual files that the plugin may be using, not just links to external things), then trying to save that state again. That saved state is garbage because files are completely gone.
It may also be true that linked things get weird, but it doesn't matter. I'm not yet sure what the correct way to do this is yet, though.
Closing this as a PEBKAC, since, as explained above, there is no way lilv could possibly make what Ardour was doing work. It only happened to work before, sometimes, if plugins didn't save files.
Please open any follow-up state bugs clearly, for example:
From a clean state, I do this and this, and get this:
/whatever/state.lv2/somefile => sometarget
and I expect this:
/whatever/state.lv2/somethingelse => someothertarget
In Ardour, saving a preset first deletes the current presets, and then re-creates it.
This worked fine before https://github.com/lv2/lilv/commit/c9a54e019d54cbccfff742d5c5662ff021b187a9, however recent liblilv unlinks all the external resource in
lilv_state_delete()
, and for some reason they are not re-created.Since creating presets works correctly, it looks as if the files are still assumed to be mapped and hence the symlinks not re-created.
Related to https://github.com/sadko4u/lsp-plugins/issues/119#issuecomment-649048899