ToME: the Tales of Maj'Eyal
http://forums.te4.org/

[1.6.0b1] Too many addons -> crash
http://forums.te4.org/viewtopic.php?f=42&t=49873
Page 1 of 1

Author:  Zizzo [ Sat Sep 28, 2019 2:31 am ]
Post subject:  [1.6.0b1] Too many addons -> crash

And I was so hoping this bug would get fixed for the 1.6 release… :cry: 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:
Code:
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:
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:
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)

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…)

Author:  Zizzo [ Sun Nov 17, 2019 1:26 am ]
Post subject:  Re: [1.6.0b1] Too many addons -> crash

…Interesting. On a hunch, I tried copying unpacked tree versions of all my own addons into the addons/ folder instead of zipping them into .teaa's, and the problem appears to have evaporated — I now have… (counts) 110 unpacked addons in place, along with all three DLCs, all three official addons and five addons from other people, and no longer so much as a hiccup. [Which is a relief, because it means my Steam instance won't eventually break if I write too many addons to upload.]

This actually reminds me of the problems I was having earlier with ZOmnibus and the T2 module. Maybe an interaction between PhysFS and ZLib?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/