Atomic inventory updates; break reference cycles
Opened this issue · 1 comments
Summarizing https://old.reddit.com/r/csharp/comments/jg80u7/how_to_diagnose_memory_corruption_controlled_by/
-
The failure to save on turn 1518 of the test savegame, is either from the serialization process itself, or a multi-threading leak putting a non-allocated Inventory object into the AI representation of "what have I seen".
-
Map's GetObjectInfo is being called once per usage in the data structures, not once per Map instance. This likely is slowing down saving the game (very invasive changes required). Search engine results indicate XML save format is hypersensitive to this (apparently far more so than binary serialization).
failure to save: atomic Inventory update is lower priority (Inventory objects that are death-dropped from, should be cleared explicitly to prevent cross-linking with the AI inventories-seen caches).
Map::GetObjectInfo test results are still relevant.