Jump to content

Lua errors when starting the game sporadically


Faalagorn

Recommended Posts

This error is kinda hard for me to nail down when it appears exactly.

 

I play at tiling window manager (sway) under Linux, meaning my windows are automatically tiled so Zomboid opens on half a screen while Steam is the other half. I make it full screen shortly after start, but sometimes I get a red LUA error when launching the game. It sometimes appear right off the bat and when loading a save, but after restarting it seems to disappear.

 

What I seem it causes is my inventory window positions and pins are reset.

 

Here's the snippet from my log:

attempted index: new of non-table: null

LOG  : General, 1603922060534> -----------------------------------------
STACK TRACE
-----------------------------------------
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 108
function: createPlayerData -- file: ISPlayerData.lua line # 188

ERROR: General, 1603922060535> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: new of non-table: null at KahluaThread.tableget line:1690.
ERROR: General, 1603922060535> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: new of non-table: null
	at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1690)
	at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:642)
	at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
	at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1981)
	at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1813)
	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:37)
	at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:122)
	at zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:365)
	at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:105)
	at zombie.GameWindow.logic(GameWindow.java:273)
	at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
	at zombie.GameWindow.frameStep(GameWindow.java:710)
	at zombie.GameWindow.run_ez(GameWindow.java:628)
	at zombie.GameWindow.mainThread(GameWindow.java:455)
	at java.lang.Thread.run(Thread.java:748)
LOG  : General, 1603922060535> -----------------------------------------
STACK TRACE
-----------------------------------------
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 108
function: createPlayerData -- file: ISPlayerData.lua line # 188


I can provide a full one is needed, but it's hard for me to figure out when exactly it's triggering – maybe someone experienced it before and can consistently make it reappear? The issue's been there for a short while, but no idea what patch could exactly cause it. I also don't know if it's unique to my setup or not.

 

EDIT: I also found this one, it's probably from the actual start of the game:

Oct 28, 2020 10:51:21 PM zombie.Lua.LuaManager RunLua
SEVERE: Error found in LUA file: /home/faalagorn/.local/share/Steam/steamapps/common/ProjectZomboid/projectzomboid/media/lua/client/XpSystem/ISUI/ISCharacterInfoWindow.lua
ERROR: General, 1603921881767> ExceptionLogger.logException> Exception thrown java.io.IOException: Bad file descriptor at FileInputStream.readBytes (Native Method).
ERROR: General, 1603921881768> DebugLogStream.printException> Stack trace:
java.io.IOException: Bad file descriptor
	at java.io.FileInputStream.readBytes(Native Method)
	at java.io.FileInputStream.read(FileInputStream.java:255)
	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
	at java.io.InputStreamReader.read(InputStreamReader.java:184)
	at java.io.BufferedReader.fill(BufferedReader.java:161)
	at java.io.BufferedReader.read(BufferedReader.java:182)
	at se.krka.kahlua.luaj.compiler.LuaCompiler.loadis(LuaCompiler.java:132)
	at se.krka.kahlua.luaj.compiler.LuaCompiler.loadis(LuaCompiler.java:124)
	at zombie.Lua.LuaManager.RunLua(LuaManager.java:491)
	at zombie.Lua.LuaManager.RunLua(LuaManager.java:460)
	at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:308)
	at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:235)
	at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:353)
	at zombie.GameWindow.init(GameWindow.java:1051)
	at zombie.GameWindow.mainThreadInit(GameWindow.java:521)
	at zombie.GameWindow.mainThread(GameWindow.java:453)
	at java.lang.Thread.run(Thread.java:748)

 

Edited by Faalagorn
Link to comment
Share on other sites

It happened again now, I think it's related to how my inventory windows are assigned? I have them long and narrow in the upper-left corner and after this error, they get centered and forget their pinned option:

 

attempted index: new of non-table: null

LOG  : General, 1604253139306> -----------------------------------------
STACK TRACE
-----------------------------------------
function: createChildren -- file: ISCharacterInfoWindow.lua line # 138
function: instantiate -- file: ISUIElement.lua line # 635
function: addToUIManager -- file: ISUIElement.lua line # 991
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 110
function: createPlayerData -- file: ISPlayerData.lua line # 188

ERROR: General, 1604253139307> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: new of non-table: null at KahluaThread.tableget line:1690.
ERROR: General, 1604253139307> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: new of non-table: null
	at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1690)
	at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:642)
	at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
	at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1981)
	at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1813)
	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:37)
	at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:122)
	at zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:365)
	at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:105)
	at zombie.GameWindow.logic(GameWindow.java:273)
	at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
	at zombie.GameWindow.frameStep(GameWindow.java:710)
	at zombie.GameWindow.run_ez(GameWindow.java:628)
	at zombie.GameWindow.mainThread(GameWindow.java:455)
	at java.lang.Thread.run(Thread.java:748)
LOG  : General, 1604253139307> -----------------------------------------
STACK TRACE
-----------------------------------------
function: createChildren -- file: ISCharacterInfoWindow.lua line # 138
function: instantiate -- file: ISUIElement.lua line # 635
function: addToUIManager -- file: ISUIElement.lua line # 991
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 110
function: createPlayerData -- file: ISPlayerData.lua line # 188

 

Link to comment
Share on other sites

  • 1 month later...

It still happens in every odd launch here and there as of 41.47, believed it's most likely due to using a tiling window manager which tiles the screen to half of my screen (1920x1080 tiled vertically) and when I force the full screen, though it might be a red herring. Do you need it to be troubleshooted further?

Link to comment
Share on other sites

  • 1 month later...

I still have it as of 41.50, the error (java.io.IOException: Bad file descriptor) might be Linux-exclusive and seems to be related with threads, this is the first found on Google (from Stack Overflow): https://stackoverflow.com/questions/10286233/bad-file-descriptor-ioexception-in-java-using-javax-xml

 

The most annoying part is having to re-size the inventory windows and close the tutorial for me, but other window placements is screwed there, but nothing else seems to break with it :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...