Page 1 of 1

[13.15][posila] Save file corruption when killing entity after changin its force (reproducible)

Posted: Sat Aug 13, 2016 7:25 pm
by mknejp
While experimenting with forces for a mod I found that sometimes the game state would corrupt or even crash when exiting. While I was unable to reproduce the crash I could find a sequence that made the game state reliably corrupt. All of this with no mods running.

Create a new game and run the following command:

Code: Select all

/c game.create_force("test");local e=game.player.surface.create_entity{name="construction-robot", force=game.player.force, position=game.player.position};e.force=game.forces.test;e.die();game.player.surface.create_entity{name="construction-robot", force=game.player.force, position=game.player.position}
Now save the game and get a game state corruption message. This also happens if the steps are done manually or when killing the entity using gunfire instead of script. See attached log. Sometimes if this happened during an autosave the game would crash when trying to quit the game after that but as mentioned I am unable to find consistent reproduction steps for the crash.

edit: clarified it's a game state corruption, not desync.

Re: [0.13.15] Desync when killing entity after changin its force

Posted: Sat Aug 13, 2016 11:38 pm
by Loewchen
The savegame corruption would be very valuable to finaly have reproduced, please provide the log and report of the desync as well, as I don't understand that yet.

Re: [13.15] Save file corruption when killing entity after changin its force (reproducible)

Posted: Sun Aug 14, 2016 12:21 am
by mknejp
Ah yes, it's not a desync. Must have misread the error message. It's only a save file corruption.

Re: [13.15][posila] Save file corruption when killing entity after changin its force (reproducible)

Posted: Sun Aug 14, 2016 11:52 am
by posila
Thanks for bug report and reliable repro steps.
Fixed for 0.13.16

Re: [13.15][posila] Save file corruption when killing entity after changin its force (reproducible)

Posted: Sun Aug 14, 2016 12:42 pm
by daniel34
Moved to Resolved for the next release.