Project Zomboid

Project Zomboid

[B41 / B42] bikinitools - independent vehicle spawner, skin changer and automations!
Error on startup (42.3.1)
I'm getting errors on startup with bikinitools in 42.3.1. To test, I only have damnlib and bikinitools enabled, and the logs look like this (if there's a better way, I can send you the whole file if needed):

[26-02-25 12:21:23.406] LOG : General f:0, t:1740532883406> ===== System specs =====. [26-02-25 12:21:23.406] LOG : General f:0, t:1740532883406> OS: Linux, version: 6.12.13-200.fc41.x86_64, arch: amd64. [26-02-25 12:21:23.407] LOG : General f:0, t:1740532883407> Available processors (cores): 16. [26-02-25 12:21:23.409] LOG : General f:0, t:1740532883408> Memory free: 436.0 MB. [26-02-25 12:21:23.409] LOG : General f:0, t:1740532883409> Memory max: 3072.0 MB. [26-02-25 12:21:23.409] LOG : General f:0, t:1740532883409> Memory total available to JVM: 500.0 MB. [26-02-25 12:21:23.409] LOG : General f:0, t:1740532883409> ======================== ... [26-02-25 12:21:23.415] LOG : General f:0, t:1740532883415> version=42.3.1 rev:26566 2025-02-12 20:16:26 (ZB) demo=false. [26-02-25 12:21:23.415] LOG : General f:0, t:1740532883415> revision=26566 date=2025-02-12 time=20:16:26 (ZB). .... [26-02-25 12:21:26.528] LOG : Mod f:0, t:1740532886528> loading \damnlib. ... [26-02-25 12:21:26.534] LOG : Mod f:0, t:1740532886534> loading \bikinitools. ... [26-02-25 12:21:29.344] LOG : General f:0, t:1740532889344> ------------------------------------------------------------- attempted index: Vehicle of non-table: null. [26-02-25 12:21:29.347] LOG : General f:0, t:1740532889347> ----------------------------------------- STACK TRACE ----------------------------------------- function: 10_BT_Vehicle.lua -- file: 10_BT_Vehicle.lua line # 1 | MOD: bikinitools v50 [B42]. [26-02-25 12:21:29.347] ERROR: General f:0, t:1740532889347> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: Vehicle of non-table: null at KahluaThread.tableget(KahluaThread.java:1667). Stack trace: se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1667) se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:479) se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1760) se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76) se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117) zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:630) zombie.Lua.LuaManager.RunLua(LuaManager.java:573) zombie.Lua.LuaManager.RunLua(LuaManager.java:559) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:418) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:310) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:470) zombie.GameWindow.init(GameWindow.java:1446) zombie.GameWindow.mainThreadInit(GameWindow.java:694) zombie.GameWindow.mainThread(GameWindow.java:589) java.base/java.lang.Thread.run(Unknown Source). [26-02-25 12:21:29.348] LOG : General f:0, t:1740532889348> ----------------------------------------- STACK TRACE ----------------------------------------- function: 10_BT_Vehicle.lua -- file: 10_BT_Vehicle.lua line # 1 | MOD: bikinitools v50 [B42]. [26-02-25 12:21:29.354] LOG : General f:0, t:1740532889354> ----------------------------------------- STACK TRACE ----------------------------------------- function: 01_BT_Helpers.lua -- file: 01_BT_Helpers.lua line # 3 | MOD: bikinitools v50 [B42]. [26-02-25 12:21:29.355] ERROR: General f:0, t:1740532889355> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index of non-table at KahluaUtil.fail(KahluaUtil.java:82). Stack trace: se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82) se.krka.kahlua.vm.KahluaUtil.luaAssert(KahluaUtil.java:70) se.krka.kahlua.vm.KahluaThread.tableSet(KahluaThread.java:1704) se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:579) se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1760) se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76) se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117) zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:630) zombie.Lua.LuaManager.RunLua(LuaManager.java:573) zombie.Lua.LuaManager.RunLua(LuaManager.java:559) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:418) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:310) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:470) zombie.GameWindow.init(GameWindow.java:1446) zombie.GameWindow.mainThreadInit(GameWindow.java:694) zombie.GameWindow.mainThread(GameWindow.java:589) java.base/java.lang.Thread.run(Unknown Source). [26-02-25 12:21:29.355] LOG : General f:0, t:1740532889355> ----------------------------------------- STACK TRACE ----------------------------------------- function: 01_BT_Helpers.lua -- file: 01_BT_Helpers.lua line # 3 | MOD: bikinitools v50 [B42]. [26-02-25 12:21:29.356] LOG : General f:0, t:1740532889356> ------------------------------------------------------------- attempted index: VehiclePart of non-table: null. [26-02-25 12:21:29.356] LOG : General f:0, t:1740532889356> ----------------------------------------- STACK TRACE ----------------------------------------- function: 11_BT_VehiclePart.lua -- file: 11_BT_VehiclePart.lua line # 1 | MOD: bikinitools v50 [B42]. [26-02-25 12:21:29.356] ERROR: General f:0, t:1740532889356> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: VehiclePart of non-table: null at KahluaThread.tableget(KahluaThread.java:1667). Stack trace: se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1667) se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:479) se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1760) se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76) se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117) zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:630) zombie.Lua.LuaManager.RunLua(LuaManager.java:573) zombie.Lua.LuaManager.RunLua(LuaManager.java:559) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:418) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:310) zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:470) zombie.GameWindow.init(GameWindow.java:1446) zombie.GameWindow.mainThreadInit(GameWindow.java:694) zombie.GameWindow.mainThread(GameWindow.java:589) java.base/java.lang.Thread.run(Unknown Source). [26-02-25 12:21:29.356] LOG : General f:0, t:1740532889356> ----------------------------------------- STACK TRACE ----------------------------------------- function: 11_BT_VehiclePart.lua -- file: 11_BT_VehiclePart.lua line # 1 | MOD: bikinitools v50 [B42].

Then there's a bunch more, all with similar stack traces. If it helps, the stack traces come in this order:

function: 10_BT_Vehicle.lua -- file: 10_BT_Vehicle.lua line # 1 | MOD: bikinitools v50 [B42]. function: 01_BT_Helpers.lua -- file: 01_BT_Helpers.lua line # 3 | MOD: bikinitools v50 [B42]. function: 11_BT_VehiclePart.lua -- file: 11_BT_VehiclePart.lua line # 1 | MOD: bikinitools v50 [B42]. function: 05_BT_Config.lua -- file: 05_BT_Config.lua line # 77 | MOD: bikinitools v50 [B42]. function: TrunkUnlocker.lua -- file: TrunkUnlocker.lua line # 3 | MOD: bikinitools v50 [B42]. function: RepairTool.lua -- file: RepairTool.lua line # 3 | MOD: bikinitools v50 [B42]. function: Spawner.lua -- file: Spawner.lua line # 3 | MOD: bikinitools v50 [B42]. function: PositionSaver.lua -- file: PositionSaver.lua line # 3 | MOD: bikinitools v50 [B42]. function: SkinChanger.lua -- file: SkinChanger.lua line # 3 | MOD: bikinitools v50 [B42]. function: OpenSesame.lua -- file: OpenSesame.lua line # 3 | MOD: bikinitools v50 [B42]. function: KeyCreator.lua -- file: KeyCreator.lua line # 3 | MOD: bikinitools v50 [B42]. function: RemoveTool.lua -- file: RemoveTool.lua line # 3 | MOD: bikinitools v50 [B42]. function: 99_BT_Event.lua -- file: 99_BT_Event.lua line # 3 | MOD: bikinitools v50 [B42]. function: Farmer.lua -- file: Farmer.lua line # 3 | MOD: bikinitools v50 [B42]. function: ContainerUnloader.lua -- file: ContainerUnloader.lua line # 3 | MOD: bikinitools v50 [B42]. function: GravelBuddy.lua -- file: GravelBuddy.lua line # 3 | MOD: bikinitools v50 [B42]. function: Gardener.lua -- file: Gardener.lua line # 3 | MOD: bikinitools v50 [B42]. function: CorpseStacker.lua -- file: CorpseStacker.lua line # 3 | MOD: bikinitools v50 [B42]. function: Lumberjack.lua -- file: Lumberjack.lua line # 3 | MOD: bikinitools v50 [B42]. function: HomeWrecker.lua -- file: HomeWrecker.lua line # 3 | MOD: bikinitools v50 [B42]. function: HideAndShow.lua -- file: HideAndShow.lua line # 3 | MOD: bikinitools v50 [B42]. function: 50_BT_Automation.lua -- file: 50_BT_Automation.lua line # 3 | MOD: bikinitools v50 [B42]. function: 05_BT_Config.lua -- file: 05_BT_Config.lua line # 3 | MOD: bikinitools v50 [B42]. function: ContextMenu.lua -- file: ContextMenu.lua line # 1 | MOD: bikinitools v50 [B42].

I don't know a ton of lua, but the ordering here makes me wonder if the files are starting in the wrong order -- I'm assuming that's what the numbering system is about, and I can see that the things the tracebacks are referencing ought to be set in the 00 file.
< >
Showing 1-6 of 6 comments
Ah, so, if I put a print() in 00_BT_Base.lua, the log comes out after 11_BT_VehiclePart.lua, so I think that the lua files are being run in the wrong order.
It appears that Zomboid should sort the files before importing them, and from a quick look in Ghidra to see the call tree, it appears it does -- although it might also be sorting the wrong variable? Not sure. In any case, it appears like the import order of bikinitools' files isn't honoured?
bikinihorst  [developer] 26 Feb @ 1:11am 
the only thing that changed in this update is the encoding of translations so that must have been going on for a while. the files are named in the order i expect the system to load them.

looking at your logs though the errors are generated by an old mod version so i can't support you there. maybe redownload the proper workshop version and try it again.
I unsubbed and resubbed with yesterday's update, still getting it with v51, but now I am fairly sure that this is a bug with PZ b42 (or maybe earlier) on Linux specifically. I've filed a bug on TIS's forums about it, which is in mod-approval state.

From reading old forum posts, it seems like your expectation is what is intended and this isn't a bikinitools bug, just the most obvious thing affected. I can only wonder why it works fine on Windows vs Linux, considering it's the same Java code...
Flipflop 27 Feb @ 6:59am 
Also getting the same issue, around 21 errors on startup. Had unsubbed a few weeks ago and resubbed today. Enabling the mod caused the game to crash, I'm also unable to verify game files (obviously that could be a general game bug rather than anything linked).

Should be noted as per my message in the main discussion I still had Bikini tools prompts in game using the left click menu even after unsubbing.

Not sure what I'm supposed to do.
bikinihorst  [developer] 27 Feb @ 9:29am 
Originally posted by Flipflop:
Not sure what I'm supposed to do.

welcome to the club. b42 is unstable so for the next update they push roll the dice!
< >
Showing 1-6 of 6 comments
Per page: 1530 50