Project Zomboid

Project Zomboid

Even More Traits
Bug Report
Im on B42.12.0 I think something broke with this update.

`function: GetWeaponPerkLevel -- file: LazoloMain.lua line # 31 | MOD: Even More Traits [b42]
function: UpdateHeldWeapon -- file: LazoloMain.lua line # 2420 | MOD: Even More Traits [b42]
function: LMinuteUpdates -- file: LazoloMain.lua line # 3077 | MOD: Even More Traits [b42]
java.lang.RuntimeException: Object tried to call nil in GetWeaponPerkLevel
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:101)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:815)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:174)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1826)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1653)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:72)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:281)
at zombie.GameTime.update(GameTime.java:759)
at zombie.gameStates.IngameState.UpdateStuff(IngameState.java:596)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1726)
at zombie.gameStates.IngameState.update(IngameState.java:1465)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:87)
at zombie.GameWindow.logic(GameWindow.java:386)
at zombie.GameWindow.frameStep(GameWindow.java:923)
at zombie.GameWindow.mainThreadStep(GameWindow.java:647)
at zombie.MainThread.mainLoop(MainThread.java:76)
at java.base/java.lang.Thread.run(Unknown Source)
`

Character save is barely a week old.
This error is constantly spammed while in-game.
Last edited by Frostyred; 27 Sep @ 6:49pm
< >
Showing 1-10 of 10 comments
Dr. Lalaoz  [developer] 28 Sep @ 1:20pm 
what are you holding when that happens?
That error is saying that your holding an object that doesnt exist.
more specifically, whatever is in your hand doesnt have the capability to call the getCategories() function. which all items in zomboid are supposed to have.
Hello! I am getting the same error. It happens to me when I am holding the scythe item from this mod:

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3474630097
@Dr. Lalaoz I was holding one of the weapons from this mod:

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3422418897
Last edited by Frostyred; 29 Sep @ 1:31am
Beathoven 29 Sep @ 12:10pm 
i even get that error with vanilla items
i got errors even while shoving zeds to the ground
veras001 29 Sep @ 5:41pm 
Subject: Bug Report - Crash when holding any item in main hand (ISOLATED TEST)

Mod: Even More Traits [b42]
File: LazoloMain.lua
Issue: Game crash occurs every tick/second when holding ANY item in main hand

Testing Environment:

✅ Tested with ONLY Even More Traits mod and Stat Tweaks Lib
✅ No other mods enabled

❌ Bug still occurs - confirming this is an issue with Even More Traits specifically

Error Details:
text

ERROR: ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: Object tried to call nil in GetWeaponPerkLevel at KahluaUtil.fail(KahluaUtil.java:101)

Problem Description:
The error occurs in the UpdateHeldWeapon() function which is called every minute by LMinuteUpdates(). The function calls GetWeaponPerkLevel() with Player:getPrimaryHandItem(), but this fails when:

Holding non-weapon items (wooden plank, rolling pin, etc.)

Holding basic vanilla weapons (starter pistol)

Holding ANY item in main hand

CONFIRMED: Issue persists even with only this mod enabled

Affected Functions:

GetWeaponPerkLevel (line ~31)

UpdateHeldWeapon (line ~2420)

LMinuteUpdates (line ~3077)

Steps to Reproduce:

Enable ONLY Even More Traits mod and its required dependencies

Start new game or load existing save

Pick up any item (weapon or non-weapon)

Hold it in main hand

Error occurs every tick/second

Expected Behavior:
Function should handle non-weapon items gracefully without crashing.

Critical Finding:
The bug is not caused by mod conflicts - it occurs even when only Even More Traits is active, confirming this is an internal issue with the mod's code.
Last edited by veras001; 29 Sep @ 5:42pm
Originally posted by Dr. Lalaoz:
what are you holding when that happens?
That error is saying that your holding an object that doesnt exist.
more specifically, whatever is in your hand doesnt have the capability to call the getCategories() function. which all items in zomboid are supposed to have.
`getCategories()` for weapons was replaced with `getWeaponCategories()` in 42.12

I got a comment mentioning this mod and person didn't reply for some time so I decided to come check, hope that helps!
Last edited by somewhatfrog; 2 Oct @ 4:06am
Originally posted by somewhatfrog:
Originally posted by Dr. Lalaoz:
what are you holding when that happens?
That error is saying that your holding an object that doesnt exist.
more specifically, whatever is in your hand doesnt have the capability to call the getCategories() function. which all items in zomboid are supposed to have.
`getCategories()` for weapons was replaced with `getWeaponCategories()` in 42.12

I got a comment mentioning this mod and person didn't reply for some time so I decided to come check, hope that helps!
It did work. There's just two files named lazolomain.lua
`function: GetWeaponPerkLevel -- file: LazoloMain.lua line # 31 | MOD: Even More Traits [b42]
function: UpdateHeldWeapon -- file: LazoloMain.lua line # 2420 | MOD: Even More Traits [b42]
function: LMinuteUpdates -- file: LazoloMain.lua line # 3077 | MOD: Even More Traits [b42]
java.lang.RuntimeException: Object tried to call nil in GetWeaponPerkLevel
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:101)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:815)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:174)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1826)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1653)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:72)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:281)
at zombie.GameTime.update(GameTime.java:759)
at zombie.gameStates.IngameState.UpdateStuff(IngameState.java:596)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1726)
at zombie.gameStates.IngameState.update(IngameState.java:1465)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:87)
at zombie.GameWindow.logic(GameWindow.java:386)
at zombie.GameWindow.frameStep(GameWindow.java:923)
at zombie.GameWindow.mainThreadStep(GameWindow.java:633)
at zombie.MainThread.mainLoop(MainThread.java:76)
at {LINK REMOVED} Source)
`

error...
Dr. Lalaoz  [developer] 5 Oct @ 8:18am 
Originally posted by Cтapый senior_pilot:
Originally posted by somewhatfrog:
`getCategories()` for weapons was replaced with `getWeaponCategories()` in 42.12

I got a comment mentioning this mod and person didn't reply for some time so I decided to come check, hope that helps!
It did work. There's just two files named lazolomain.lua
everything in the "42.0" folder is for build 42, everything in the "media" folder is for 41 and older. this is just how the file structure was changed when B42 dropped.
< >
Showing 1-10 of 10 comments
Per page: 1530 50