[1.6.0b1] Too many addons -> crash
Posted: Sat Sep 28, 2019 2:31 am
And I was so hoping this bug would get fixed for the 1.6 release…
This appears to be a long-standing bug; I've run into it myself fairly frequently in 1.5.10, and I've found reports of what looks like the same bug at least as far back as 1.5.3.
Basically, if you have more than a certain number of addons in your addons/ directory (experimentation yields 96 for my current beta build, but looks it was 99 with the pre-built linux64 executable I was running for 1.5.10), whether or not they're enabled, attempting to create a new character or load an existing character will crash the game with one of various errors:
DLCs and addons for other modules all appear to count toward this maximum, and the particular stack trace I get appears to vary according to the number of addon files present.
(My coder instincts are suggesting a memory overrun somewhere in PhysFS — something is writing past the end of its allocated memory and clobbering other parts of the Lua API. I might try to fish up a memory debugging library of some sort and track that down…)

Basically, if you have more than a certain number of addons in your addons/ directory (experimentation yields 96 for my current beta build, but looks it was 99 with the pre-built linux64 executable I was running for 1.5.10), whether or not they're enabled, attempting to create a new character or load an existing character will crash the game with one of various errors:
Code: Select all
Lua Error: attempt to call a nil value
At [C]:-1
At /engine/utils.lua:1197 getRealPath
At /engine/Module.lua:338 parse
At /engine/Module.lua:358 listBackgrounds
At /engine/Module.lua:721
At [C]:-1 enable
At /engine/Module.lua:717 loadScreen
At /engine/Module.lua:951 instanciate
At /engine/utils.lua:2470 showMainMenu
At /engine/init.lua:199
At [C]:-1 dofile
At /loader/init.lua:217
PANIC: unprotected error in call to Lua API (attempt to call a nil value)
Code: Select all
Lua Error: attempt to call a nil value
At [C]:-1
At /engine/Module.lua:730
At [C]:-1 enable
At /engine/Module.lua:717 loadScreen
At /engine/Module.lua:951 instanciate
At /engine/utils.lua:2470 showMainMenu
At /engine/init.lua:199
At [C]:-1 dofile
At /loader/init.lua:217
PANIC: unprotected error in call to Lua API (attempt to call a nil value)
Code: Select all
Lua Error: attempt to call a nil value
At [C]:-1
At /engine/FontPackage.lua:88 get
At /engine/Module.lua:741
At [C]:-1 enable
At /engine/Module.lua:717 loadScreen
At /engine/Module.lua:951 instanciate
At /engine/utils.lua:2470 showMainMenu
At /engine/init.lua:199
At [C]:-1 dofile
At /loader/init.lua:217
PANIC: unprotected error in call to Lua API (attempt to call a nil value)
(My coder instincts are suggesting a memory overrun somewhere in PhysFS — something is writing past the end of its allocated memory and clobbering other parts of the Lua API. I might try to fish up a memory debugging library of some sort and track that down…)