[0.14.21] Error on running deserialization.

Place to get help with not working mods / modding interface.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

[0.14.21] Error on running deserialization.

Post by Adil »

I'm getting the following error when trying to load savegame with my mod:
image
It is not printed in log file or stdout, just this popup.
Whatever is that supposed to tell me and why is this happenning?
Attachments
_autosave2.zip
(562.66 KiB) Downloaded 82 times
RemoteManagement_0.0.1.zip
(17.19 KiB) Downloaded 74 times
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15998
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.21] Error on running deserialization.

Post by Rseding91 »

You're storing function closures in the global table which isn't supported as they don't save/load properly.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [0.14.21] Error on running deserialization.

Post by Adil »

Yes, but it usually just strips them of upvalues and then runtime error happens which explicitly points to where upvalue was used. This message is outright useless as it is not even dumped completely.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15998
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.21] Error on running deserialization.

Post by Rseding91 »

Adil wrote:Yes, but it usually just strips them of upvalues and then runtime error happens which explicitly points to where upvalue was used. This message is outright useless as it is not even dumped completely.
You can contact the people that maintain Lua and ask for a better error because that's where it's coming from :)
If you want to get ahold of me I'm almost always on Discord.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [0.14.21] Error on running deserialization.

Post by Adil »

For the reference:
This was not caused by closures, it was caused by using complicated tables as keys for other table.
Tables as a key do not always cause this error, but when they do...
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Post Reply

Return to “Modding help”