[1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save corrupt

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
jixxed
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 27, 2017 9:57 am
Contact:

[1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save corrupt

Post by jixxed »

log attached
Attachments
factorio-current.log
(39.23 KiB) Downloaded 288 times
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5286
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by Klonan »

Can you provide the save game?
Can you make it happen again at all?
jixxed
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 27, 2017 9:57 am
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by jixxed »

I can add the savegame. I deleted the _autosave7.tmp.zip, which was corrupted(likely due to the exception).
It happened while I was AFK. I did not try to reproduce it, but perhaps you can by AFKing. I just continued the game and no issues since.
I expect the exception/stacktrace gives some pointer as to what is going wrong?
Attachments
_autosave6.zip
(17.47 MiB) Downloaded 120 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14343
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by Rseding91 »

I looked at the place in code where the crash happens and the only way that can happen is due to memory corruption. Since the value the crash is talking about is enforced to be <= 300 through our code and it's reporting as > 64000 which is impossible without memory corruption.

Unless you have some reliable way to reproduce the issue I added a logging line for the next release that will include the size it finds so we can better see what it thinks the size is.
If you want to get ahold of me I'm almost always on Discord.
jixxed
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 27, 2017 9:57 am
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by jixxed »

That could very well be the root cause.
I experienced a single VM on the same server sometimes crashing with a memory error. The memory was untouched running in the server without issue for 7 years, so the sudden error did not scream bad memory to me. I've swapped all the memory in the server and am now running memtest on the old. Will let you know the results.
jixxed
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 27, 2017 9:57 am
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by jixxed »

I ran memtest on the RAM and it came back with no errors. That is still no guarantee though, but it's about as far as can go to exclude hardware issues. Will continue to play on the server to see if this or other issues arise.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14343
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by Rseding91 »

It's always possible for RAM to be perfectly fine but still have random bit flips :) Hardware isn't perfect.
If you want to get ahold of me I'm almost always on Discord.
jixxed
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 27, 2017 9:57 am
Contact:

Re: [1.1.37] Game exit. FlowStatistics attempted to save value larger than uint16 as uint16. Exiting to prevent save cor

Post by jixxed »

No issues since the RAM swap, so I guess this issue can be closed.
Post Reply

Return to “1 / 0 magic”