All IDEs of one Delphi version share one GExperts settings key in the registry, including the 32 and 64 bit RAD Studio 13 IDEs. When two of them save at the same time, for instance when both are closed together, their writes interleave.
Bug #519 was the worst consequence: a string list was saved by deleting its key and writing it again, so one IDE could delete the key while the other was writing into it ("Failed to set data for 'Count'"), and a list was gone as soon as any write after the delete failed. Since revision 5843 the key is never deleted, so this can no longer fail or lose a list. What remains is that two IDEs saving at the same moment can still leave a mix of both: for each value the last writer wins, and one list can end up with its count from one IDE and some of its items from the other.
This request is about removing that remaining mix. Two approaches are described below.
A named mutex, derived from the settings key, taken around every save, including the whole save at shutdown, so that one IDE saves completely before another starts. A version of this that waited at most 5 seconds and then wrote anyway was implemented and tested (two IDEs closing together saved one after the other), but not committed: a lock that is ignored after a timeout is not a real lock. The requested behaviour is that a failed lock prevents writing. That requires:
Most of it is in GX_ConfigurationInfo.pas (lock class, no-op writes, the process-wide state, a message helper), plus TGExperts.Destroy, the configuration dialog and the import.
Instead of keeping settings in memory and saving them when the IDE closes, every change could be written to the registry when it is made, and settings could be read from the registry whenever they are needed rather than once at start-up. Two IDEs would then rarely save the same thing at the same moment, and a change made in one IDE would show up in the other.
This can only go so far. Some state has to stay per IDE instance: enabling or disabling an expert, for example, must not switch it on or off in another running IDE, and making that expert state follow the registry live would be difficult anyway. It also touches every expert, since each has its own load and save code, and some settings (window sizes and positions, histories) change so often that writing them on every change is not attractive.
Bug #519 (fixed in revision 5843).