[2.0.32] Save file Corrupt

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Sascha975
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Oct 31, 2024 7:19 am
Contact:

[2.0.32] Save file Corrupt

Post by Sascha975 »

When loading my save, I get an error (Corrupt map, invalid tile count loaded from map.)
Neither the main save file, nor the autosaves load and result in the same error.
I haven't switched versions or changed mods. I tried validating the game files through Steam, with no success.
The only save that works is from 2 months ago, and i would prefer not to lose 200h of game time :-?
Attachments
Space Age [Vanilla].zip
Savefile
(61.44 MiB) Downloaded 40 times
Error message
Error message
Factorio save error.png (1.87 MiB) Viewed 625 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4030
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.32] Save file Corrupt

Post by boskid »

Well, the save file is corrupted.

In most cases i am not willing to fix save files that show signs of more than 1 corruption inside but this was quite weird due to how many things were absurdly off.

So the crash you see is caused by trying to load tiles data for a chunk [-21,9] on gleba, however that is not the root cause.

Tiles data are simply one of the first pieces of data to load for a given chunk and the corruption starts on a chunk before it, at chunk[-21,8] on gleba. On this chunk there is gleba-spawner-small at position {-653.937, 261.812} (unit number 1925864). Here was the first corruption i was unable to explain: there are two extra "0" bytes present inside of save file right after this entity. They had absolutely no reason for being here as right after them there was another entity present and enemy spwner had no more data to save. I do not know if this was some type of zip corruption triggered by cpu fault or bit flip, if there would be 2 extra bytes inserted then save file would have not well formed parts of level.dat as one of them would be 2 bytes larger than an exact megabyte and yet all of them were correct so i suspect the corruption happened while saving. Anyway i decided to get rid of those 2 bytes and rest of the save file was deserialised correctly.

But it was not fixed yet. Targeters seem to be corrupted here. One of the spider units was pointing at a corpse of medium-demolisher-trail-upper ({-647.895, 261.813} on gleba. How the hell is there a demolisher corpse on gleba??). I looked at the targetables nearby and found that this medium-demolisher-trail-upper (targetable 1206673) was right before a small-strafer-pentapod-leg (targetable 1206674). So i decided to reattach this targeter to the small-strafer-pentapod-leg. And finally the game loaded.

But it then immediately crashed on a consistency check. Issue was that this medium-demolisher-trail-upper (which is a Corpse) was corrupted. Updatable entities are usually in one of 6 possible modes, however this entity was reporting as being in mode "96". I decided to fix this updatable entity by making it inactive which required... to change 2 bytes into "0". This is really suspicious because this issue was within 50 bytes of the previous 2 bytes i had to remove.

And finally, the save file managed to load and consistency seems to be passing.
maybe fixed save file
I decided to look what happened on the gleba:
gleba near -647,261
And here it is, Medium demolisher trail on gleba. I have no idea what is it doing here. I also have no clue how is it possible that the strafer on the bottom has only 4 legs when the prototype says it should have 5 legs.


I think i will have to stop fixing people's save files because recently that gave absolutely no insight into any bug in the game itself, all of them seem to be some types of cpu or ram corruptions and we work on an assumption that 2+2=4 and if cpu says that its not then it is not our fault if save file becomes corrupted.
polarnut
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Feb 09, 2025 2:17 am
Contact:

Re: [2.0.32] Save file Corrupt

Post by polarnut »

I have the exact same error when I go to load it. It gives the same error and the autosaves do not work either.

I do not have the tools nor the skill to fix it myself and do not know the problem.

If someone could fix it I would be so grateful.
Attachments
Brothers.zip
(43.91 MiB) Downloaded 27 times
Post Reply

Return to “Technical Help”