[0.11.19] loading crash: modding experiments
Posted: Sat Mar 21, 2015 11:10 am
I currently develop a mod generating dynamic structures like outposts or walls automatically and have some problems storing the data persistent. I found that the metatable is not stored in the savegame so i have to reset it in onload.
I am not quite shure what i have done, but in some way i must have created a structure in the glob variable that causes a stack overflow error when it gets loaded.
When the game autosaves, onload is called (is this by purpose?) and my own method (recursive tree walk) causes stack overflow and loading the game after restart crashes the game (also with stack overflow)
My guess is that there is a circular reference in the structure (a table that contains a table containing the outer one) and your loadLuaObjects Method is not able to handle this (mine reactivateMeta neither) but i have no clue why there should be.
I added the logfile zipped as neither .log nor .txt are allowed extensions. I also added current version of my mod so you can reproduce it.
I am not quite shure what i have done, but in some way i must have created a structure in the glob variable that causes a stack overflow error when it gets loaded.
When the game autosaves, onload is called (is this by purpose?) and my own method (recursive tree walk) causes stack overflow and loading the game after restart crashes the game (also with stack overflow)
My guess is that there is a circular reference in the structure (a table that contains a table containing the outer one) and your loadLuaObjects Method is not able to handle this (mine reactivateMeta neither) but i have no clue why there should be.
I added the logfile zipped as neither .log nor .txt are allowed extensions. I also added current version of my mod so you can reproduce it.