Cataclysm-dda: Incorrect save loading

Created on 18 Oct 2019  路  1Comment  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Some games are not loaded correctly. No error message is generated, it is silently corrupted. NPC positions will be shifted, map tiles will be regenerated, vehicles may disappear, and enemies may teleport/pop out of thin air.
The missing player vehicle still shows its position on the overmap, but attempts to remote control it fail, and if the player/NPCs are inside when this happens you get the "attempt to dismount vehicle" errors saying the vehicle was not found.

Bisection indicates this comes from https://github.com/CleverRaven/Cataclysm-DDA/commit/6e62d19b6ffe151e4060560a8a8804e4495f4d2e

Steps To Reproduce

I had two save games that exhibited the error yesterday, but now the smaller one no longer has the RV vanish when I tried it this morning? It's possible I saved over it with one of the versions I was bisecting. (Attempts to fix the other save by rewriting it have failed though)
The big one is colossal and more than I want to upload with my terrible bandwidth so I guess I'll try to debug it myself. But hopefully somebody else has some ideas on what might be going on?

Expected behavior

Screenshots

Loaded from before the bug:
image

After the bug:
image
NPCs shifted northward, houses all different.

Versions and configuration

  • OS: Linux
  • Game Version: Anything from 6e62d19 up to current master
  • Graphics version: Terminal
  • Mods loaded: MST, boats, no flaming weapons, no survivor armor, more classes and scenarios

Additional context

Add any other context about the problem here.

(S1 - Need confirmation) <Bug>

Most helpful comment

Bit of late night code-poking and I've identified the problem, it only happens on saves with very remote map coordinates! The old code was looking for maps/97.-19.0/3,117.-583.0.map and the new code is looking for maps/97.-19.0/3117.-583.0.map The commas are missing! I'm off to bed, but will see about patching it soon if nobody else gets to it first.
Actually, should old saves be renamed, or should the commas be put back?

>All comments

Bit of late night code-poking and I've identified the problem, it only happens on saves with very remote map coordinates! The old code was looking for maps/97.-19.0/3,117.-583.0.map and the new code is looking for maps/97.-19.0/3117.-583.0.map The commas are missing! I'm off to bed, but will see about patching it soon if nobody else gets to it first.
Actually, should old saves be renamed, or should the commas be put back?

Was this page helpful?
0 / 5 - 0 ratings