Thanks for the report. This is now fixed for 2.1. However: something worth mentioning - the way you've made this sample mod is going to cause desyncs in multiplayer since the "code to run next tick" is not saved/loaded and will not persist through multiplayer joining.
Because it’s parsing the strings into ordered and validated map settings. However in the settings stage there are no prototypes so it can’t translate names to prototypes or validate anything.
Wouldn't it make sense to pass the item_number, if one exists? It wouldn't perfectly get the item that was opened since not all have them, but wouldn't it cover most cases where people actually care about the item, since it's usually those that have data tied to them?
I could add it, however it's not going to be guaranteed accurate since the event can originate from literally any item in any stack. It may happen that slot [3] was clicked and is a simple iron plate. In the event for mod A, it clears the entire inventory putting power armor in all slots. Then mod B ...
Thanks for the report. Looking into the logic, it used to work with the time stamps to determine which file to use. It was changed in 2017 in an attempt to avoid overwriting steam-synced settings however the save logic was never updated to avoid clobbering the local file.
The crash is in some cleanup code after saving is essentially finished which means it successfully went over everything to save and is now doing book-keeping to finish. This suggests everything was correct when it went over it and between that and cleanup something corrupted the memory it was using ...