Page 1 of 1

*[0.13] Save game corruption error

Posted: Mon Jun 27, 2016 10:58 pm
by MaxamusCrasious
Version 0.13, Windows 10 on Steam

With the game running in windowed mode, I inadvertently quit by clicking the window's close button. After restarting, my main named save file "Ramrod" (Playtime 39:25:02) and autosave_3 (Playtime 39:25:00) crash the game on load, autosave_2 (Playtime 39:20:00) loads fine.

The only thing I can think of that changed after autosave_2 was that my handcrafting queue had the Speed 3, Efficiency 3, and the Power Armor MK 2 modules building.

Prior to this situation, I had opened and closed v0.13 several times today with this particular map without issue. In those situations, I used the in game menu though, nor do I think I had anything in my handcrafting queue.

Below are the log files from loading my named save and autosave_3. The saved games can be downloaded here: http://maxamuscrasious.com/z/saves.zip
factorio-current-autosave3.log
Logfile from autosave_3
(12 KiB) Downloaded 132 times
factorio-current-main.log
Logfile from main save
(12 KiB) Downloaded 119 times

Re: [0.13] Error while loading save game

Posted: Mon Jun 27, 2016 11:11 pm
by Rseding91
Did you have any entities get damaged and repaired during the time when the map became corrupt?

Re: [0.13] Error while loading save game

Posted: Mon Jun 27, 2016 11:25 pm
by Bamans
I am also getting a very similar crash. Log is attached. Save is here: https://dl.dropboxusercontent.com/u/306 ... osave2.zip

My save is an autosave with appx 30 minutes of gameplay on top of a 0.12.35 save. I only did a little bit during that thirty minutes:
I replaced all my filter inserters that only needed the logistic network with filter inserters by replacing them in place.
I also attached an accumulator to a stack inserter via the circuit network.
I know that several turrets / objects were repaired or replaced by construction bots while I played.
I also removed some inserters and belts that were misplaced because of the shape change for trains.

Happy hunting.

Re: [0.13] Error while loading save game

Posted: Mon Jun 27, 2016 11:36 pm
by cdavst
I also am having this issue. It was a 12.35 save that got updated. I played with some train stuff, very little research but I did deforest a large area with my shotgun which caused me to need to repair a few things including a power pole and laser turret.

edit: I originally uploaded the wrong log file. It is the right one now.

Re: [0.13] Error while loading save game

Posted: Mon Jun 27, 2016 11:43 pm
by MaxamusCrasious
Rseding91 wrote:Did you have any entities get damaged and repaired during the time when the map became corrupt?
Between autosave_2 and 3? Not that I am aware of. The last repairs I know of happening were at least 10 minutes prior to autosave_2.

It is possible there may have been a biter attack at my iron outpost, but there are only turrets out there, so there would be no automatic repair, nor was there any attack in the 5 minutes following restarting from autosave_2.

Re: [0.13] Error while loading save game

Posted: Mon Jun 27, 2016 11:56 pm
by Rseding91
Unfortunately the save files in the corrupt state only tell me something is broken. I need some way to reproduce the issue from a working save so if anyone is able to figure that out I can get this resolved.

Re: [0.13] Error while loading save game

Posted: Tue Jun 28, 2016 12:07 am
by Bamans
I'll take the case ;)

https://dl.dropboxusercontent.com/u/306 ... rashy2.zip

^ Load this save. Wait about 3-5 seconds and a wave of aliens will come in from the north. It seems as soon as any of the those aliens appear on the minimap, saving produces a corrupt save. My character was standing by the copper mine to the northeast in the save, but I think the wave is getting picked up on radar.

https://dl.dropboxusercontent.com/u/306 ... es2Min.zip

^ This is another version of the same map, about 2 minutes out from the corruption inducing event.

Re: [0.13] Error while loading save game

Posted: Tue Jun 28, 2016 12:13 am
by Rseding91
Bamans wrote:I'll take the case ;)

https://dl.dropboxusercontent.com/u/306 ... rashy2.zip

^ Load this save. Wait about 3-5 seconds and a wave of aliens will come in from the north. It seems as soon as any of the those aliens appear on the minimap, saving produces a corrupt save. My character was standing by the copper mine to the northeast in the save, but I think the wave is getting picked up on radar.

https://dl.dropboxusercontent.com/u/306 ... es2Min.zip

^ This is another version of the same map, about 2 minutes out from the corruption inducing event.
Excellent! Running the debugger now.

Re: [0.13] Error while loading save game

Posted: Tue Jun 28, 2016 12:24 am
by MaxamusCrasious
**Edit** Looks like while I was typing, you may have figured something out... But just in case

Leading up to me closing the window:
The research window was open
Landfill had just recently been finished

Now things get a bit fuzzy

I forget if I had just researched grenade damage 2 and was looking at cluster grenades -or- I was just about to research grenade damage 2

There was either a speed 1 or speed 2 module currently being produced.

Since restarting from autosave_2

I have researched landfill, grenade damage 1, 2 and 3 and continued my quest for power armor mk2, the only difference is that I did not start handcrafting an obnoxious amount of speed and efficiency modules - I built a couple assemblers to handle that.

I have manually saved the game and quit several times without issue. I am about to backup my save and see if

1) closing the window with the button kills my file
2) closing the window with the button and the research window open kills my file

Here is my current, working save: http://maxamuscrasious.com/z/Ramrod_stillworking.zip

Re: [0.13] Error while loading save game

Posted: Tue Jun 28, 2016 1:23 am
by Rseding91
fixed for 0.13.1.

Saves in the corrupt state aren't recoverable but saves that do load should work fine.
Fixed map corruption and possible crashes when damaged stone rocks migrated from 0.12 saves got destroyed in 0.13
You can run this command in the temporary to prevent any possible crashes you might get if your map is one of those with the bugged stone rocks:

Code: Select all

/c for k,v in pairs(game.player.surface.find_entities_filtered({area={{-10000, -10000}, {10000, 10000}}, name="stone-rock"})) do
  if v.health ~= 200 then
    v.destructible = false
  end
end

Re: [0.13] Error while loading save game

Posted: Tue Jun 28, 2016 1:52 am
by MaxamusCrasious
Interesting... Now that you bring up rocks, I did plow through some with my tank after the upgrade to .13, but it was about an hour before the corrupted save and they were in a part of the map I have never been to before. But, there is one rock in my main base, damaged before the upgrade to 0.13, and untouched since.

Re: [0.13] Error while loading save game

Posted: Wed Jun 29, 2016 2:04 am
by cdavst
Rseding91 wrote:fixed for 0.13.1.

Saves in the corrupt state aren't recoverable but saves that do load should work fine.
Fixed map corruption and possible crashes when damaged stone rocks migrated from 0.12 saves got destroyed in 0.13
You can run this command in the temporary to prevent any possible crashes you might get if your map is one of those with the bugged stone rocks:

Code: Select all

/c for k,v in pairs(game.player.surface.find_entities_filtered({area={{-10000, -10000}, {10000, 10000}}, name="stone-rock"})) do
  if v.health ~= 200 then
    v.destructible = false
  end
end
I ran this command on my last uncorrupted save as soon as I loaded it. I checked my saves over then next half hour and verified that they were working. After a while I stopped checking them but now have discovered that I still have this issue. Unfortunately all of my autosaves are also corrupted so I can't give you a reproducible situation.

Re: [0.13] Error while loading save game

Posted: Wed Jun 29, 2016 2:08 am
by SmokaCola
Getting the same issues even after running the command. I have an in-depth thread about it here:viewtopic.php?f=49&t=27437

I didn't know this thread existed until after I made mine, so sorry for the duplicate.

Re: [0.13] Error while loading save game

Posted: Wed Jun 29, 2016 3:08 am
by MaxamusCrasious
*Update*

I did not run the command, and after reading about the rock issue, left the one rock that I know was damaged before the .13 update alone. Up to 44 hours, lots of building, and destruction of the wilderness with my tank (rocks, trees, nests, etc) and no corrupted save.

Letting curiosity run wild, I backed up my save file and mined said rock. I saved the game, and the file got corrupted.

Reloaded the uncorrupted copy, then started to mine the rock but stopped halfway. The game saved cleanly.

Starting fresh from my uncorrupted copy again, I shot at the rock until it's "health" was about 50%. The game saved cleanly.

Starting fresh again, I went out into the wilderness, and found a rock south west of my main base, mined it with my steel axe and saved. No corruption.

Thinking about it more, it is quite likely that when I was waiting for my handcrafting queue to process, I remembered that rocks are now mineable, and decided that it was time for that rock to go as it is kinda in the way of where I drive my car and tank through my base (hence why it had a bit of damage to begin with).

This workaround seems to get the job done :lol:

Image