Page 1 of 1

[1.1.81] Crash loading save, checkNearbyForcesUnRegistration fails

Posted: Sat May 06, 2023 9:58 am
by Joetropy
We're running a moderatley modded SpaceExploration playthrough (hosting the saved game directly from steam client for 1-2 friends).
Starting yesterday factorio started crashing on some attempts to do the regular 10min autosaves, reverting back and forth trying to load older saves to continue from there.
Now i've got 3 conescutive saves (finished without crashing the game) from our latest play session which all result in factorio crashes directly on loading them (both hosting the saved game and trying to load as a singleplayer game) Deactivating some and all mods still crashes the game on load.

factorio-current.log
(188.03 KiB) Downloaded 65 times
save-file
this is the oldest save with the crash on load already occuring

Re: [1.1.81] Crash loading save, checkNearbyForcesUnRegistration fails

Posted: Tue May 16, 2023 9:29 pm
by boskid
With Rseding we took a look at this save file and there are traces of memory corruption. The crash happens on the military target that is attached to a straight-rail at position {2231, 285} on surface "Hadur". That rail was not supposed to have a military target. The same rail also reports a unit number of "13944272" which is also suspicious because there is also an inserter on the same surface with the same unit number but that inserter belongs to a miniloader. There are no traces of unit number allocator overflow so i am going to say that this specific rail was somehow corrupted and was incorrectly saved with wrong unit number and with wrong flag of having military target.

For the military target flag, a "fixed" save file (where basically 1 byte was changed using hex editor) is here:
106118-CSE_2023-05-06_0003-fixed.zip

Given the random nature of this corruption i am going to say this is 1/0 magic unless you can show steps to reproduce the issue.

-- edit (29th May) fixed link

Re: [1.1.81] Crash loading save, checkNearbyForcesUnRegistration fails

Posted: Wed May 17, 2023 6:41 pm
by Joetropy
you guys are just awesome :D
had a look at an older save, that rail segment was supposed to have Unit Number: 13958858 originaly. Hope I won't find a way to reproduce though :')