Possible ID collision when saving a project
https://github.com/LMMS/lmms/pull/2875#issuecomment-448790522:
there might still be the potential here for ID collisions. Say a control with ID
EO_ID_MSB | 0xf00is automated, then it will be saved with ID0xf00. Now, when the project is reloaded, it is possible for another control to be given IDEO_ID_MSB | 0xf00, which is now free, and if that were automated, an ID collision would occur when saving the file. The chances of this depend on the number of controls already automated, butEO_ID_MSBis 2^23 so they will tend to lie around 1 in a million.
@DomClark, do you want to handle this?
I think I might be going to fix this later.
Fixing this should make #4723 unnecessary, since you will not need to look for alternate ids.
True. That's why I said that's a temporary patch.
Reviving this issue because it's been stale for a hot minute and I'm considering working on it. Would it be worth using Qt-provided UUIDs for this? Automation UUIDs would be saved in and restored from the project file and newly created IDs for... well, anything, really - would have only an infinitesimal probability of collision, since they'd span a 128-bit range. Would blow up project file size a bit since you'd now need to add 16 bytes per saved UUID, but would fix collision issues once and for all.
...I'm considering working on it.
You got a thumbs up from @DomClark so I'm assigning this to you.