Project Zomboid

Project Zomboid

Multiple Generators
Line 15 - attempted index: zombie.characters.IsoPlayer@5cfcdb01 of non-table
Hey,

I've noticed that using the mod, with two generators cause the mod to throw an error and not display the window.

A preface:
  • Without the mod enabled, there's no errors on showing generator info - it's specifically this mod that causes the error to appear.
  • The mod is loaded first and is on top of the Mod Order list.
  • I'm playing solo, not on Multiplayer.
  • All the generators I've tested have been disconnected, moved around and reconnected.

The error in question is such:
attempted index: zombie.characters.IsoPlayer@7de60305 of non-table: null function: perform -- file: ISGeneratorInfoAction.lua line # 15 | Vanilla java.lang.RuntimeException: attempted index: zombie.characters.IsoPlayer@7de60305 of non-table: null at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782) at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:85) at zombie.characters.CharacterTimedActions.LuaTimedActionNew.perform(LuaTimedActionNew.java:104) at zombie.characters.IsoGameCharacter.updateInternal(IsoGameCharacter.java:9726) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.characters.IsoGameCharacter.update(IsoGameCharacter.java:9464) at zombie.characters.IsoPlayer.updateInternal1(IsoPlayer.java:1943) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.characters.IsoPlayer.update(IsoPlayer.java:1924) at zombie.MovingObjectUpdateSchedulerUpdateBucket.update(MovingObjectUpdateSchedulerUpdateBucket.java:79) at zombie.MovingObjectUpdateScheduler.update(MovingObjectUpdateScheduler.java:145) at zombie.iso.IsoCell.ProcessObjects(IsoCell.java:2955) at zombie.iso.IsoCell.updateInternal(IsoCell.java:5750) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.iso.IsoCell.update(IsoCell.java:5696) at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3499) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.iso.IsoWorld.update(IsoWorld.java:3427) at zombie.gameStates.IngameState.updateInternal(IngameState.java:1617) at zombie.gameStates.IngameState.update(IngameState.java:1333) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101) at zombie.GameWindow.logic(GameWindow.java:298) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.GameWindow.frameStep(GameWindow.java:765) at zombie.GameWindow.run_ez(GameWindow.java:681) at zombie.GameWindow.mainThread(GameWindow.java:495) at java.base/java.lang.Thread.run(Unknown Source)

The lines 14 & 15 in the file "ISGeneratorInfoAction.lua" are:
function ISGeneratorInfoAction:perform() local window = ISGeneratorInfoWindow.windows[self.character]


Couple of things I've noticed that cause the behavior:
  • Clicking "Show Generator Info" on the 1st generator placed isn't causing an issue, but 2nd generator onwards - doesn't show the window and shows the error above in console.

  • If clicking "Show Generator Info" on the 1st generator first - and the 2nd generator afterwards (only if they're side by side) - the error does not appear.

  • If the 2nd generator is not directly beside the 1st generator (In my case, to the right of the 1st one) - then there's no window and the error appears.

  • More than two generators and it will cause errors even on the 1st generator and sometimes it doesn't.

Appreciate the help in advance and I'll be glad to help you debug this further, if need be.
Last edited by AlexRainbowCookies; 24 Jul, 2024 @ 9:25pm