[2.0.14] Corrupted Save(s) while debugging.
[2.0.14] Corrupted Save(s) while debugging.
I have a save file I use for testing things in the game and somehow, it (and all autosaves taken within the last half hour) have managed to become corrupted with an error that says "Invalid bool loaded from input file. File could be corrupted"
This save does use a singular mod (Lua API global variable viewer) that lets me inspect lua objects but I wouldn't have thought it should be possible for it to cause save file corruption. I have not been altering the lua state during my playthrough, just inspecting objects I need to pull data from.
The save is attached.
Edit: some relevant lines that I found in the log, though you'll probably see them yourselves
475.343 Info Scenario.cpp:178: Map version 2.0.14-2
475.570 Warning Map.cpp:358: Map loading failed: Invalid bool loaded from input file. File could be corrupted.
476.124 Error AppManagerStates.cpp Invalid bool loaded from input file. File could be corrupted.
This save does use a singular mod (Lua API global variable viewer) that lets me inspect lua objects but I wouldn't have thought it should be possible for it to cause save file corruption. I have not been altering the lua state during my playthrough, just inspecting objects I need to pull data from.
The save is attached.
Edit: some relevant lines that I found in the log, though you'll probably see them yourselves
475.343 Info Scenario.cpp:178: Map version 2.0.14-2
475.570 Warning Map.cpp:358: Map loading failed: Invalid bool loaded from input file. File could be corrupted.
476.124 Error AppManagerStates.cpp Invalid bool loaded from input file. File could be corrupted.
- Attachments
-
- Debug Testing.zip
- (48.77 MiB) Downloaded 12 times
Re: [2.0.14] Corrupted Save(s) while debugging.
Thanks for the report however the map file is already corrupt. Do you have the non-corrupt version I can use and steps to get it into the corrupt state?
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.14] Corrupted Save(s) while debugging.
Looking at the save, there is exactly 1 byte that is corrupt which when fixed allows the save to be loaded. That has historically always meant failing hardware on the players computer. Most commonly bad RAM. I recommend running a memory test https://www.memtest.org/
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.14] Corrupted Save(s) while debugging.
I booted a bootable memtest86 and had no issues. All the autosaves are also corrupted and were taken 5 minutes apart. I can upload them if you like but I'm pretty suspicious about blaming this one on hardware... unless the space station that's currently nuking the hell out of asteroids managed to rowhammer the memory (though if it flipped an entire byte and not a bit, that's unlikely), but that particular peculiarity is a universal vulnerability of all RAM.
For my own reference, can you give me the filename and offset I need to hexedit to make it functional again?
For my own reference, can you give me the filename and offset I need to hexedit to make it functional again?
Re: [2.0.14] Corrupted Save(s) while debugging.
I don't know the offset sorry. It's on the character logistic point - the boolean that says if it requests from buffers or not. The save file is split into multiple chunks compressed in RAM and written into the zip.
It's possible there's some base game bug that corrupted it. But so far nobody has found any steps to take a known good save and get it into a broken state.
It's possible there's some base game bug that corrupted it. But so far nobody has found any steps to take a known good save and get it into a broken state.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.14] Corrupted Save(s) while debugging.
Alright, if I'm SOL then I'm SOL. If you can provide me with like ~20 bytes, even just a screenshot, maybe I can extract the zip, search the sequence from all the files in there and patch it.
No expectations but I'd sure appreciate it.
No expectations but I'd sure appreciate it.
Re: [2.0.14] Corrupted Save(s) while debugging.
[2.0.14] Space age
I have same issue in same environment. I created dev world made for blueprints with activated /cheat and /editor a couple days ago. Today i get error dedicated to this world. Save and autosaves don't load with error "Invalid bool loaded from input file. File could be corrupted". Other saves work normally.
No mods
Memtest64 4 passes, no errors.
https://drive.google.com/file/d/1l5at2v ... share_link
Strings from log file:
39.749 Warning Map.cpp:358: Map loading failed: Invalid bool loaded from input file. File could be corrupted.
40.129 Error AppManagerStates.cpp Invalid bool loaded from input file. File could be corrupted.
42.431 Loading map C:\Users\konstantin\AppData\Roaming\Factorio\saves\_autosave2.zip: 60780484 bytes.
42.458 Loading level.dat: 159422493 bytes.
42.462 Info Scenario.cpp:178: Map version 2.0.14-2
43.738 Error RuntimeError.cpp:24: Invalid bool loaded from input file. File could be corrupted.
Factorio crashed. Generating symbolized stacktrace, please wait ...
I have same issue in same environment. I created dev world made for blueprints with activated /cheat and /editor a couple days ago. Today i get error dedicated to this world. Save and autosaves don't load with error "Invalid bool loaded from input file. File could be corrupted". Other saves work normally.
No mods
Memtest64 4 passes, no errors.
https://drive.google.com/file/d/1l5at2v ... share_link
Strings from log file:
39.749 Warning Map.cpp:358: Map loading failed: Invalid bool loaded from input file. File could be corrupted.
40.129 Error AppManagerStates.cpp Invalid bool loaded from input file. File could be corrupted.
42.431 Loading map C:\Users\konstantin\AppData\Roaming\Factorio\saves\_autosave2.zip: 60780484 bytes.
42.458 Loading level.dat: 159422493 bytes.
42.462 Info Scenario.cpp:178: Map version 2.0.14-2
43.738 Error RuntimeError.cpp:24: Invalid bool loaded from input file. File could be corrupted.
Factorio crashed. Generating symbolized stacktrace, please wait ...
- Attachments
-
- factorio-current.log
- (34.94 KiB) Downloaded 10 times
Last edited by gansgut on Thu Nov 07, 2024 9:16 am, edited 2 times in total.
Re: [2.0.14] Corrupted Save(s) while debugging.
Actually, someone found a reproduction for this here viewtopic.php?f=30&t=120101 In a rare first, "invalid bool loaded from input file" was an engine bug! So this issue is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.14] Corrupted Save(s) while debugging.
The fixed file. Although it will keep getting broken until the fixed version is released. The trigger to break it is: change the force of a character entity from one that does not have logistics unlocked to one that does.
- Attachments
-
- Debug Testing fixed.zip
- (48.35 MiB) Downloaded 14 times
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.14] Corrupted Save(s) while debugging.
Good to hear, as a C++ dev myself, my first thought was that it'd be a race condition, turns out it's simpler than that! Glad you found it.
Many thanks for the fixed save!
Many thanks for the fixed save!
Re: [2.0.14] Corrupted Save(s) while debugging.
Actually, someone found a reproduction for this here viewtopic.php?f=30&t=120101 In a rare first, "invalid bool loaded from input file" was an engine bug! So this issue is now fixed for the next release.
Thank you for fast reaction! Please fix my save too)
Or how can i fix it by myself?
Re: [2.0.14] Corrupted Save(s) while debugging.
From the looks of it it should be fixed automatically if you load it into 2.0.16 which was just released a few minutes ago. The linked report is listed in the changelog. That versions currently experimental so you'd need to opt into the experimental branch of the game if you haven't yet.gansgut wrote: ↑Fri Nov 08, 2024 2:58 pmActually, someone found a reproduction for this here viewtopic.php?f=30&t=120101 In a rare first, "invalid bool loaded from input file" was an engine bug! So this issue is now fixed for the next release.
Thank you for fast reaction! Please fix my save too)
Or how can i fix it by myself?
Re: [2.0.14] Corrupted Save(s) while debugging.
[2.0.16] experimentalSilari wrote: ↑Fri Nov 08, 2024 3:42 pmFrom the looks of it it should be fixed automatically if you load it into 2.0.16 which was just released a few minutes ago. The linked report is listed in the changelog. That versions currently experimental so you'd need to opt into the experimental branch of the game if you haven't yet.gansgut wrote: ↑Fri Nov 08, 2024 2:58 pmActually, someone found a reproduction for this here viewtopic.php?f=30&t=120101 In a rare first, "invalid bool loaded from input file" was an engine bug! So this issue is now fixed for the next release.
Thank you for fast reaction! Please fix my save too)
Or how can i fix it by myself?
I just uploaded latest beta. In right left corner of the screen i have sign ''2.0.16 (build 80214 expansion, win64)".
Corrupted save doesn't load with same error "Invalid bool loaded from input file. File could be corrupted".
So save wasn't fixed automatically. Or i did something wrong. What can i do next?
-
- Burner Inserter
- Posts: 6
- Joined: Sat Oct 26, 2024 11:29 am
- Contact:
Re: [2.0.14] Corrupted Save(s) while debugging.
Hey Rseding91,
I'm curious, what tool are you using to inspect the save file data? You said it's compressed into the save, so I'm wondering if there is a way to uncompress the data so I can look at it myself?
Thanks!
I'm curious, what tool are you using to inspect the save file data? You said it's compressed into the save, so I'm wondering if there is a way to uncompress the data so I can look at it myself?
Thanks!
Re: [2.0.14] Corrupted Save(s) while debugging.
I use the game itself while visual studio's debugger is attached.
If you want to get ahold of me I'm almost always on Discord.
-
- Burner Inserter
- Posts: 6
- Joined: Sat Oct 26, 2024 11:29 am
- Contact:
Re: [2.0.14] Corrupted Save(s) while debugging.
Ah right of course haha that makes sense! I just noticed the Factorio PDB is provided right with the executable in the installation directory, so that's nice!
There's a few other instances of this crash in 2.0.16, and they all end up with a stack trace that ends up failing deserialisation through `LogisticsPointFilter::load()`. I haven't personally ran into it but I was trying to see if I could modify whatever byte offset of the save file in order to fix the save file for someone else.
Will try run with a debugger myself and see if I can narrow down what's going on.
There's a few other instances of this crash in 2.0.16, and they all end up with a stack trace that ends up failing deserialisation through `LogisticsPointFilter::load()`. I haven't personally ran into it but I was trying to see if I could modify whatever byte offset of the save file in order to fix the save file for someone else.
Will try run with a debugger myself and see if I can narrow down what's going on.
- BraveCaperCat
- Filter Inserter
- Posts: 304
- Joined: Mon Jan 15, 2024 10:10 pm
- Contact:
Re: [2.0.14] Corrupted Save(s) while debugging.
Shouldn't this be moved to "Fixed Bugs"?
Creator of multiple mods, including Quality Assurance - My most popular one. Expect multiple modding-related questions, answers and other posts.
Re: [2.0.14] Corrupted Save(s) while debugging.
Corrupted saves doesn't fix automatically.
Players still meet this bug also in 2.0.16. Here is latest discussion viewtopic.php?f=7&t=120318&p=637117&hilit=bool#p637117.Silari wrote: ↑Fri Nov 08, 2024 3:42 pm From the looks of it it should be fixed automatically if you load it into 2.0.16 which was just released a few minutes ago. The linked report is listed in the changelog. That versions currently experimental so you'd need to opt into the experimental branch of the game if you haven't yet.
Why this bug should be moved to fixed ones?
Re: [2.0.14] Corrupted Save(s) while debugging.
@olipro: I've recovered your ship design and attached it as a blueprint string.
Also this is ridiculous lol:
Also this is ridiculous lol:
- Attachments
-
- olipro_ship.txt
- (22.3 KiB) Downloaded 11 times
Re: [2.0.14] Corrupted Save(s) while debugging.
@gansgut - here's your save file that I've fixed in the same way I've fixed mine: https://factorio.domnomnom.com/2024-game-test-2 fixed.zip
How I fixed mine: viewtopic.php?p=637305#p637305
How I fixed mine: viewtopic.php?p=637305#p637305