[Rseding91] [1.0.0] Savefile corrupts if invalid LuaItemStack is in global table
[Rseding91] [1.0.0] Savefile corrupts if invalid LuaItemStack is in global table
I found a case that allows save without warning but making cannot load the save again.
Reproduce :
- Download scenario and upzip in scenario folder to play it.
- It's writing some LuaObjects caught in event, in global table. Currently only LuaItemStack is written.
- Place a wooden-chest and save it. (Will cause on_built_entity having stack = LuaItemStack as temporary object)
- Try to load it.
English is not my native language. Sorry for bad English.
My mods :
Lua API global Variable Viewer (mod portal)
Lua API Event Trace (mod portal)
My tools :
Locale String Editor (github.io webapp)
My mods :
Lua API global Variable Viewer (mod portal)
Lua API Event Trace (mod portal)
My tools :
Locale String Editor (github.io webapp)
Re: [1.0.0] Savefile corrupts if invalid LuaItemStack is in global table
Thanks for the report. It's now fixed for the next release. The issue is trying to save the temporary stack given during the on-built-entity event; it's invalid after the event finishes so saving it in global serves no purpose. It's not supposed to crash but that's what is causing it for you.
If you want to get ahold of me I'm almost always on Discord.