Corrupt map: unknown quality prototype ID 140.

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.
eurotomania
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 14, 2025 1:51 am
Contact:

Corrupt map: unknown quality prototype ID 140.

Post by eurotomania »

Hello,

Today when I tried to load my save, the manual one or all 3 autosaves, I keep getting an error saying:
"Corrupt map: unknown quality prototype ID 140. File has likely been corrupted due to failing hardware."

Yesterday, I saved the game manually with no issues and exited the game.
Nothing changed in my computer and I am PRETTY sure I have no hardware issues (of course can't be 100%, hence "pretty" sure).

I played this savegame for over 400 hours and have no intention to start from scratch.
Any help on fixing this issue would be appreciated.
Attachments
b1.zip
(35.22 MiB) Downloaded 12 times
_autosave3.zip
(35.24 MiB) Downloaded 14 times
_autosave2.zip
(35.25 MiB) Downloaded 11 times
_autosave1.zip
(35.35 MiB) Downloaded 15 times
factorio-previous.log
(7.83 KiB) Downloaded 13 times
factorio-current.log
(7.06 KiB) Downloaded 13 times
robot256
Smart Inserter
Smart Inserter
Posts: 1311
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Corrupt map: unknown quality prototype ID 140.

Post by robot256 »

Unfortunately, for performance reasons the game does not validate the game state when it is saved, only when it is loaded. Some people make backup every day for this reason. If you have any sort of file backup application installed on your computer, you can look for older copies of the save file that will probably work.

There is at least one thread a month where someone discovers that Factorio is the very first indication they have of a bad RAM stick or CPU, which is why the error message says that. It's an easy thing to test with Memtest86.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
eurotomania
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 14, 2025 1:51 am
Contact:

Re: Corrupt map: unknown quality prototype ID 140.

Post by eurotomania »

Thank you very much for the quick reply.

Memtest86 found no issues.


" Some people make backup every day for this reason."

I am sorry to say, as a software engineer myself, that suggesting this or putting this on the user, especially who has no idea this is a possibility, is not a viable solution.

I dont know if the save file format is publicly available bit if I knew the format, or have some sort of code just the loader, I am pretty sure I could save my save files.

But your answer is pretty much "too late" or "your fault", which is not the case.

Thank you again anyways and goodbye factorio. Was a blast.
eugenekay
Filter Inserter
Filter Inserter
Posts: 867
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Corrupt map: unknown quality prototype ID 140.

Post by eugenekay »

Adding the Infinite Quality Tiers mod before loading the game allows it to parse the "bad" Quality ID 140 as Valid... however it reveals a new error:
Corrupt map: unknown item prototype ID 22590. File has likely been corrupted due to failing hardware.
A naive search for the Hexadecimal value "58 3e" (=22590) reveals several matches across the level.dat## data chunks; the troublesome entry will likely be nearby a "8c" Quality value (=140). The format is just serialized C++ data structures.... it does change over time as new Fields are added, so there is no Stable reference point. You can use the .PDB files included in the Windows ZIP version with your favorite Debugger to get a copy of the Load/Save function code.

On a different line of inquiry, I note that your system is a "AMD Ryzen 7 3700X"; implying that it does not use ECC-style memory and would therefore be susceptible to undetectable runtime corruption that does not recur in Memtest. As well, some generations of Ryzen CPUs have been reported to suffer damage under high thermal load in tight math-processing loops. So I would not rule out system issues by any means.

Good Luck, fellow Software Engineer! :-)
User avatar
pioruns
Fast Inserter
Fast Inserter
Posts: 231
Joined: Tue Nov 05, 2024 3:38 pm
Contact:

Re: Corrupt map: unknown quality prototype ID 140.

Post by pioruns »

You are software engineer and you have not done even one manual save? Relaying 100% on couple ot autosaves? Really?

And you are sure hardware is not a culprit?
Memtest is one piece of the puzzle (RAM), but what about CPU?
Did computer pass prime95 stress test?
eurotomania wrote: Sat Nov 15, 2025 4:07 pm Thank you again anyways and goodbye factorio. Was a blast.
Bye.

😆
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4288
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Corrupt map: unknown quality prototype ID 140.

Post by boskid »

This definitely looks like some sort of CPU hicckup, item production statistics for "player" force had statistics for invalid item. One of the options was to completly cut the item production statistics data out of the save file, but for now i decided to only change this one record to represent wooden chests and the save file seems to be loading fine. If it does not load for you i may just cut entire item production statistics out of this save file to make rest of it loadable.
Attachments
131754-b1-fixed.zip
(29.9 MiB) Downloaded 6 times
Post Reply

Return to “Technical Help”