mod page https://mods.factorio.com/mod/SandboxedLuaCombinator
It adds combinators programmable in lua.
I am developing mod, and at some point it become impossible to save game when any of my mod's combinators are active, while I can't find that I placing anything wrong to global table. Moreover, game crashes when I try it second time.
Reproducing:
- Load attached save file, with attached mod. It is just a new game with modded combinator placed with editor, with this mod only.
- Open combinator, type any text, press OK button.
- Try to save game - get error.
- Return to game. (important)
- Try to save game again. Now game crashes.
[0.18.3] Crash to desktop when saving with mod: LuaCustomTable cannot be serialized.
[0.18.3] Crash to desktop when saving with mod: LuaCustomTable cannot be serialized.
- Attachments
-
- SandboxedLuaCombinator_0.3.4.zip
- mod
- (160.2 KiB) Downloaded 132 times
-
- crash-test.zip
- save
- (1.23 MiB) Downloaded 115 times
-
- factorio-current.log
- (9.75 KiB) Downloaded 132 times
Re: [0.18.3] Crash when saving with my mod
I found a workaround: don't store anything not serializable not just in global but anywhere it can be accessed by metatables (from objects in global).
Re: [0.18.3] Crash to desktop when saving with mod: LuaCustomTable cannot be serialized.
Thanks for the report. The game crash is now fixed for the next release. The error is expected; LuaCustomTables aren't meant to be stored beyond a local functions execution since the game doesn't know how to save them and so they can never be saved.
If you want to get ahold of me I'm almost always on Discord.