[0.10.3] local variable limit killed my save game

This subforum contains all the issues which we already resolved.
Post Reply
Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

[0.10.3] local variable limit killed my save game

Post by Neotix »

I have Wagons mod installed, and that mod store information in local variables.
After setting over 200 wagons I can't load a game because of that error:
Image

Deleting mod only cause game crash.

Link to mod section where I reported bug and get answer from mod creator
https://forums.factorio.com/forum/vie ... 107#p38107

Save: https://dl.dropboxusercontent.com/u/167 ... Gra001.zip

Game worked fine with that amount of wagons. Only savegame can't be load.

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by Dark »

Limit was reached by the script that was generated by engine and embedded into save file, engine reacts weirdly to a lot of

Code: Select all

glob.entities[#glob.entities+1] = entity
But everything is fine when nesting entities in a table

Code: Select all

glob.entities[#glob.entities+1] = {entity = entity}
Crash with mod removed could be caused by entirely unrelated bug.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by slpwnd »

We are using serpent library (https://github.com/pkulchenko/serpent) for serialization. This seems to be related to how that one works. Actually script.dat files are readable files that contain lua code interpreted when the game is loaded.

Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by Neotix »

Is there any way to fix that save? I would like to not lose over 200h of gameplay.

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by SuperSandro2000 »

Have you no autosaves from before that point?

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by slpwnd »

Neotix wrote:Is there any way to fix that save? I would like to not lose over 200h of gameplay.
Have you simply tried deleting (or better renaming) the script.dat file? Actually I tried to load your save without any mods and it crashes and breaches couple of internal asserts (that are not present in the release build). There will be some work from our side needed to fix this.

Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by Neotix »

Whaaaa IT"S WORKING. Now I'm crying from happiness like a baby.
Deleting script.dat helps.

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by Dark »

Neotix wrote:Whaaaa IT"S WORKING. Now I'm crying from happiness like a baby.
Deleting script.dat helps.
Be aware that you'll probably need to rebuild/replace manually a lot of modded buildings since script.dat contained information accumulated and needed by mods to work correctly.

Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by Neotix »

So far I noticed only that I lost items in Compressed chests (few thousands of resource) but it's not a big problem.

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

Re: [0.10.3] local variable limit killed my save game

Post by Rseding91 »

Neotix wrote:So far I noticed only that I lost items in Compressed chests (few thousands of resource) but it's not a big problem.
I'll be making a spawn-able tool that lets you set the amount a chest has stored for events like this.

EDIT: also, you didn't lose "a few thousands" :P you lost exactly 1,770,333 iron ore, 191,083 coal, and 771,687 stone.
If you want to get ahold of me I'm almost always on Discord.

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [0.10.3] local variable limit killed my save game

Post by JamesOFarrell »

Neotix wrote:Whaaaa IT"S WORKING. Now I'm crying from happiness like a baby.
Deleting script.dat helps.
Glad this is working. Felt so bad not being able to help. I'm stuck on 3g at the moment so my internet access is very limited.

Post Reply

Return to “Resolved Problems and Bugs”