[boskid][1.1.76] Any chances recovering this save?

This subforum contains all the issues which we already resolved.
masternc
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Feb 18, 2023 10:11 pm
Contact:

[boskid][1.1.76] Any chances recovering this save?

Post by masternc »

Hi,

my last save seems to be corrupted. 'Invalid bool loaded from input file'.
I wish I could load last 3 autosaves, but they give the same error. This is a 550 hrs save game, and I'd really appreciate if you guys can recover/fix it.
If not, then.. it's going to be my last attempt to play factorio. I had this error before, restarted the game from scratch and now I'm facing the same issue.
I love this game but I'm not happy to fight these constant bugs ruining my very long games.
Thank you in advance

https://drive.google.com/file/d/1DNcVTB ... share_link

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

Re: [boskid][1.1.76] Any chances recovering this save?

Post by boskid »

I took a look at this save file and the error is correct: when loading level.dat at offset 249546864 the left line of the se-space-transport-belt on Nauvis Orbit at position {-17.5, 52.5} said hasRapidInteractions="64" where the only allowed values are 0(false) and 1(true). It does not look like having rapid interactions so i fixed that value to be "false"
105492-belt.png
105492-belt.png (238.21 KiB) Viewed 2516 times
That was the only corruption in the save file and here is fixed save file: https://drive.google.com/file/d/1g7UXsP ... sp=sharing

I am not going to fix any more save files from you unless you can show the issue is with the game itself and not with your hardware. Given your posts history i would rather say its the hardware so please do not create bad PR for stuff that are not under our control.

masternc
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Feb 18, 2023 10:11 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by masternc »

Thank you so much man, you saved my day!

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

The issue is not completely over. We can say: well, it is my hardware or cosmic rays, so what can I do to prevent next gamesave loss after another XXX hrs?

My solution is: I make additional manual gamesaves once a day - two or three rotating backup files. If some gamesave will corrupt for whatever reason, I will lose just one day. This is not the only reason for long-delay backups: sometimes I make some terrible mistake and notice it too late.

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

Re: [boskid][1.1.76] Any chances recovering this save?

Post by boskid »

coppercoil wrote: ↑
Fri Mar 10, 2023 9:33 am
The issue is not completely over. We can say: well, it is my hardware or cosmic rays, so what can I do to prevent next gamesave loss after another XXX hrs?
I cannot give you any answers here. If we compute 2+2 and the processor gives answer of 5 (CPU error) then its outside of our assumptions of how CPU works. If we have a variable that holds a value of 7 and at some point later when read it gives a value of 15 then it is outside of our assumptions of how RAM works. If factorio would be designed for a radiation hardened hardware with triple redundancy and ecc memory then most likely performance would not be our concern and we could perform some computations more than once or store multiple copies of some variables just to verify they were not corrupted somehow, but since we are dealing with non ecc memory on a consumer grade hardware, if a corruption of any type happens there is not much we can do from the software point of view. Range of possible outcomes is so large that trying to guard agains all types of corruption is just not feasible without extreme solutions like having 2 game instances running in parallel on the same PC, feeding them the same input actions and checking if they did not desync (and if they did, which one was the wrong one? and how often should a full desync check be peformed which takes as much time as saving entire game state). If a hardware is not following our expectations we are not going to change our expectation, basically i am considering such hardware unsupported due to being unreliable.

I am always trying to consider if such corruption happens indeed due to some software error, some stray pointer corrupting memory but i have to keep sanity as well. If such error would indeed be in the code, my assumption is that from time to time such line of code would hit an unallocated block of memory causing a crash and i would immediately see a spike of crashes happening on that line of code in our log tracker. Obviously this may not be always the case like when doing some incorrect static casts the code may never crash but will be corrupting the memory in weird ways but thats why i am also manually fixing saves to see which variable exactly was in fault. In case of the corruption from this topic it was a transport line connector class which is never part of any static casts so i could rule out this specific line of thinking here making it more likely the hardware is at fault.

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

Can the values be checked during the saving? This will not prevent such errors, but will give an immediate warning "use backup autosave RIGHT NOW", and the autosave will do the job it's intended to.
Yes, value checking would take more time, there may be an optional checkbox in the options. This option can be turned on automatically after the first unsuccessful load.

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

Re: [boskid][1.1.76] Any chances recovering this save?

Post by boskid »

coppercoil wrote: ↑
Fri Mar 10, 2023 10:35 am
Can the values be checked during the saving?
Checked against what? The check that was throwing in this case was when loading a boolean which is basically 1 bit of data saved inside of 1 byte so the upper 7 bits have to be 0. I could check if bool being saved has those upper 7 bits cleared but thats basically it. There are no checks in case of a floating point number corruption, there are no checks for an integer number corruption, there are no checks for map position corruption (viewtopic.php?p=569694#p569694), there are no checks that tile ids are still correct if they are within a range.

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

I will not give up :). Let's check what we can check: bools and enums; some integer and float variables also have "sane" value ranges. If we check 30%, this is good. The extreme case - make a load test (simplified) right after a save. If I had faulty hardware, I would want such option regardless of additional time costs.

Twinsen
Factorio Staff
Factorio Staff
Posts: 1330
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by Twinsen »

These issues are so rare that they should not happen more than once in the lifetime of a Factorio player. If you have issues repeatedly something is really wrong with your hardware.
Consider the following:
- Running some memtests overnight
- Running some CPU+GPU stress tests
- Disabling XMP
- Making sure your BIOS CPU/RAM parameters are at default or good values.
- Make sure no overclocking is being done.

Sadly a lot of hardware comes overclocked from factory. And many motherboard manufacturers bundle all kinds of "optimizers" that overclock you PC.
They might give better performance but at the cost of reliability.

Edit: a previous post mentions you(original poster) overclocked your RAM and this corruption shows a bit flip in the RAM. I don't think there's a clearer indication that overclocking is the issue.
Run memtest for as many hours as you run Factorio and you will very likely see the issue.

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

Twinsen wrote: ↑
Fri Mar 10, 2023 12:33 pm
If you have issues repeatedly something is really wrong with your hardware.
This is the point: can I play Factorio WHEN my hardware looks faulty but I'm not able to find exact reason?

Developers can say "we are not responsible for your hardware", and they can say "our game runs regardless of your hardware". Both statements are right. The costs are different, of course.
Nevertheles, if checks cannot be implemented, gamesave backup management can save the game. Currently, I do it manually. This is simple.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13219
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by Rseding91 »

We do attempt to validate what we can when saving. The issue(s) come from the performance impact the validation has. The players with correctly working hardware (the vast majority) don't want to pay increasingly more cost to try to catch issues on malfunctioning hardware. And even still; the checks we can put in place do not catch everything. If the error happens outside of our code (between leaving Factorio address space and being fully written to disk) we can't hope to ever catch it.
coppercoil wrote: ↑
Fri Mar 10, 2023 9:33 am
... what can I do to prevent next gamesave loss after another XXX hrs? ...
Make as many backups in as many ways as you feel are necessary. There's nothing that says your computer won't die completely 10 seconds from now and lose every save file that was on it. You have to decide how many layers of backups you want.
If you want to get ahold of me I'm almost always on Discord.

Tertius
Filter Inserter
Filter Inserter
Posts: 684
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by Tertius »

There are several mods that help with autosave management: There is a "quicksave" mod that creates an autosave you hit some hotkey, autosaves numbered from 1 to infinity. Or there are autosave mods that will create more than 3 autosaves. Just search for "autosave" in the mod portal.

Me, I use a file backup software to create daily backups of my changed PC data. If every current autosave should turn out defective, I am able to pull the last working one from my backup.
If you fear corruption, create one manual individually named save every day just after you started playing. This will work even without backup.

However, in the 1908 hours I played Factorio, there was never even one broken save. I guess I bought a good PC. The PC is rock stable, it never (sic, never!) needs to reboot/reset and apps never crash (except perhaps some notoriously unstable beta software).

I also experimented with overclocking, however the caveats (increased heat, increased system instability) never justified that tiny amount of increased computing power. An increase of 10% computing power is barely noticeable - only with benchmarks, but not perceived. If I want a faster PC, I buy one.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2587
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by FuryoftheStars »

Tertius wrote: ↑
Fri Mar 10, 2023 8:10 pm
Or there are autosave mods that will create more than 3 autosaves.
This is actually adjustable from in game under The Rest settings, too. :)
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

Tertius wrote: ↑
Fri Mar 10, 2023 8:10 pm
If you fear corruption, create one manual individually named save every day just after you started playing.
Are there mods that can do gamesave on daily basis? Say, for last three days?
I guess mods can't because they have no access to a wall clock, right?
Could Factorio do that for a player?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2587
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by FuryoftheStars »

coppercoil wrote: ↑
Sat Mar 11, 2023 10:56 am
Tertius wrote: ↑
Fri Mar 10, 2023 8:10 pm
If you fear corruption, create one manual individually named save every day just after you started playing.
Are there mods that can do gamesave on daily basis? Say, for last three days?
I guess mods can't because they have no access to a wall clock, right?
Could Factorio do that for a player?
You don't need a mod for this. Simple backup software can do this.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

FuryoftheStars wrote: ↑
Sat Mar 11, 2023 1:01 pm
You don't need a mod for this. Simple backup software can do this.
I'm a little surprised how difficult to explain the main idea. Modern software does fkn everything for a user, so he does not need to know what the "mod" is, what 3rd party software he need, and player does not need to even know that his gamesave may fail. If game does not load for whatever reason (hardware, ransomware, user error), five-star software automatically checks all backups for a given map and offers a solution in a single click. Why can't app do all the discussed things for me? Because game is not a backup software? This is an old-fashioned thinking. Every modern app makes any backups if users may need for that. Clever developers solve all questions: when, where, how many. Users just need smooth careless experience. There are four autosave files? Why do I need to know that? I want to load the last good gamesave and nothing more. Do you offer installing third-party software for this???

Xorimuth
Filter Inserter
Filter Inserter
Posts: 627
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by Xorimuth »

coppercoil wrote: ↑
Sat Mar 11, 2023 5:54 pm
FuryoftheStars wrote: ↑
Sat Mar 11, 2023 1:01 pm
You don't need a mod for this. Simple backup software can do this.
There are four autosave files? Why do I need to know that? I want to load the last good gamesave and nothing more.
The autosaves aren't just for corrupt saves. If I make a mistake in game and don't realise for 10 minutes, I might choose to load an autosave that isn't the latest one...
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

coppercoil
Filter Inserter
Filter Inserter
Posts: 477
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by coppercoil »

Xorimuth wrote: ↑
Sat Mar 11, 2023 5:59 pm
The autosaves aren't just for corrupt saves. If I make a mistake in game and don't realise for 10 minutes, I might choose to load an autosave that isn't the latest one...
Automatic backups serve both these purposes, just need a proper GUI for that. For developers, backup management and GUI tweaking are rather boring than challenging.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2587
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by FuryoftheStars »

coppercoil wrote: ↑
Sat Mar 11, 2023 5:54 pm
FuryoftheStars wrote: ↑
Sat Mar 11, 2023 1:01 pm
You don't need a mod for this. Simple backup software can do this.
I'm a little surprised how difficult to explain the main idea. Modern software does fkn everything for a user, so he does not need to know what the "mod" is, what 3rd party software he need, and player does not need to even know that his gamesave may fail. If game does not load for whatever reason (hardware, ransomware, user error), five-star software automatically checks all backups for a given map and offers a solution in a single click. Why can't app do all the discussed things for me? Because game is not a backup software? This is an old-fashioned thinking. Every modern app makes any backups if users may need for that. Clever developers solve all questions: when, where, how many. Users just need smooth careless experience. There are four autosave files? Why do I need to know that? I want to load the last good gamesave and nothing more. Do you offer installing third-party software for this???
Are you serious right now?

I am obviously not familiar with everything out there and I'm sure there may be exceptions, but of all the games I have played, not *1* has had the features you are asking for. Not even most major productivity software has these features. They all say that backups are the end user's responsibility.

I want the developers of a game to concentrate on development of a game, not backup features that are essentially duplicating efforts done by someone else that you should be using anyway. Autosaves in a game are primarily for the reason Xorimuth stated: being able to load from a previous point to undo/redo some decisions you made. A nice bonus is in case your primary file got corrupted, but that's really all it is. (Well, that and to give you a save point in case the game crashes and it's been a while since your last manual save.)
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Tertius
Filter Inserter
Filter Inserter
Posts: 684
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: [boskid][1.1.76] Any chances recovering this save?

Post by Tertius »

Software cannot fix everything if hardware is defective. In this case, it seems the hardware is faulty. Not so bad the machine is completely unusable, but the output produced on that hardware is sometimes faulty. It's now the responsibility of the user to fix or replace the hardware. It's not the responsibility of the game developer to foresee every possible hardware issue and prepare for this. Because of this all games crash on defective GPU hardware or driver, and all games are unable to load corrupted saves. No game I ever played checks the validity of the memory it is writing into the save file. Every developer works under the assumption the memory doesn't randomly flip values by itself, because a properly working PC doesn't do this.

If the user doesn't acknowledge his hardware is defective and insists the game developer must do a workaround instead, I guess there is nothing more to discuss.

Post Reply

Return to β€œResolved Problems and Bugs”