[0.10.x][slpwnd] Save file lost if lua error in onsave.

This subforum contains all the issues which we already resolved.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

[0.10.x][slpwnd] Save file lost if lua error in onsave.

Post by rk84 »

If you try to save over an old savefile, saving can fails due to lua error. You will loose the file you are overwriting and possibly the currently active game, if it crashes.

Possiple steps:
1.Make new game
2.Save it
3.Type this code to console

Code: Select all

game.onsave(function() error("bye-bye") end)
4.Try to save again


I was able to crash it too, when I tried calling error without any parameters. It left me 2kB zip and when I tried unzip it, XP asked to insert last floppy in drive :lol:
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.x][slpwnd] Save file lost if lua error in onsave.

Post by slpwnd »

Thanks for the report. In 0.10.7 the save is first done to the temporary location and only if it succeeds it is moved over to where it should go.
Post Reply

Return to “Resolved Problems and Bugs”