Jump to content
  • 0

Null Pointer Exception with animals in a basement


Question

Posted (edited)

Version: [42.5.1]

Mode: [Singleplayer]

Server settings: [N/A]

Mods: [None]

Save: [Old Save]

 

Notes:

I currently have a save with pigs in a basement. When loading this save, after a short but random time, it will crash.
I'm not sure if it's related, but I also get an error when trying to create animal zones down there.

I have uploaded videos and stack traces for both scenarios.

The basement I have gotten the crash in is located at the northern Rosewood gas station (X: 8178, Y: 11268, Z: -1)

I have save games just before and after the crash if they are needed but they are too big to upload here.

Thank you.


Crash stack trace from console.txt:

ERROR: General      f:2297, t:1741837468059> ExceptionLogger.logException> Exception thrown
	java.lang.NullPointerException: Cannot read field "x" because "<local3>" is null at BaseAnimalBehavior.tryAndGetGrassFloor(BaseAnimalBehavior.java:972).
	Stack trace:
		zombie.characters.animals.behavior.BaseAnimalBehavior.tryAndGetGrassFloor(BaseAnimalBehavior.java:972)
		zombie.characters.animals.behavior.BaseAnimalBehavior.tryEatGrass(BaseAnimalBehavior.java:1225)
		zombie.characters.animals.behavior.BaseAnimalBehavior.checkEatBehavior(BaseAnimalBehavior.java:1146)
		zombie.characters.animals.behavior.BaseAnimalBehavior.checkBehavior(BaseAnimalBehavior.java:616)
		zombie.characters.animals.behavior.BaseAnimalBehavior.update(BaseAnimalBehavior.java:363)
		zombie.characters.animals.IsoAnimal.updateInternal(IsoAnimal.java:438)
		zombie.characters.animals.IsoAnimal.update(IsoAnimal.java:395)
		zombie.MovingObjectUpdateSchedulerUpdateBucket.update(MovingObjectUpdateSchedulerUpdateBucket.java:71)
		zombie.MovingObjectUpdateScheduler.update(MovingObjectUpdateScheduler.java:155)
		zombie.iso.IsoCell.ProcessObjects(IsoCell.java:3062)
		zombie.iso.IsoCell.updateInternal(IsoCell.java:5963)
		zombie.iso.IsoCell.update(IsoCell.java:5896)
		zombie.iso.IsoWorld.updateWorld(IsoWorld.java:4191)
		zombie.iso.IsoWorld.updateInternal(IsoWorld.java:4311)
		zombie.iso.IsoWorld.update(IsoWorld.java:4225)
		zombie.gameStates.IngameState.updateInternal(IngameState.java:1811)
		zombie.gameStates.IngameState.update(IngameState.java:1507)
		zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
		zombie.GameWindow.logic(GameWindow.java:388)
		zombie.GameWindow.frameStep(GameWindow.java:928)
		zombie.GameWindow.run_ez(GameWindow.java:821)
		zombie.GameWindow.mainThread(GameWindow.java:619)
		java.base/java.lang.Thread.run(Unknown Source)

 


Video of crash:

 

Create animal zone stack trace from console.txt:

STACK TRACE
-----------------------------------------
function: addZone -- file: ISAddDesignationAnimalZoneUI.lua line # 129 | Vanilla
function: onCreateZone -- file: ISAddDesignationAnimalZoneUI.lua line # 116 | Vanilla
function: onClick -- file: ISModalDialog.lua line # 77 | Vanilla
function: onMouseUp -- file: ISButton.lua line # 56 | Vanilla

ERROR: General      f:1951, t:1741861045427> ExceptionLogger.logException> Exception thrown
	java.lang.RuntimeException: attempted index: setHighlighted 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:624)
		se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
		se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
		se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1902)
		se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
		zombie.ui.UIElement.onMouseUp(UIElement.java:1633)
		zombie.ui.UIElement.onMouseUp(UIElement.java:1588)
		zombie.ui.UIElement.onConsumeMouseButtonUp(UIElement.java:1695)
		zombie.ui.UIManager.updateMouseButtons(UIManager.java:869)
		zombie.ui.UIManager.update(UIManager.java:728)
		zombie.GameWindow.logic(GameWindow.java:332)
		zombie.GameWindow.frameStep(GameWindow.java:928)
		zombie.GameWindow.run_ez(GameWindow.java:821)
		zombie.GameWindow.mainThread(GameWindow.java:619)
		java.base/java.lang.Thread.run(Unknown Source)



Video of animal zone error:

 

 

Edited by macas1
Added location information

2 answers to this question

Recommended Posts

  • 0
Posted
5 hours ago, Kleozis said:

The first error is because your some pigs are starving, and the tryAndGetGrassFloor method detects a null square.

More details here

 

 

Thank you, this does appear to be the same bug causing the crash issue. In my example, the pigs are well fed and have access to food and water in the basement, so it seems they still look for grass floors regardless. 

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...