Hbm's Nuclear Tech Mod

Hbm's Nuclear Tech Mod

1M Downloads

Crash due to NPE when searching recipes in anvil

LekKit opened this issue ยท 3 comments

commented

Describe the bug

  1. Try to search any recipe in the anvil
  2. Crash

It is worth noting I am using GTNH NEI + ChickenCore forks (which are mentioned in the stacktrace). However the crash actually happens inside HBM GUIAnvil so I guess this must be fixed here.

Description: Updating screen events

java.lang.NullPointerException: Updating screen events
	at com.hbm.inventory.gui.GUIAnvil.recipeToSearchList(GUIAnvil.java:365)
	at com.hbm.inventory.gui.GUIAnvil.search(GUIAnvil.java:101)
	at com.hbm.inventory.gui.GUIAnvil.func_73869_a(GUIAnvil.java:461)
	at net.minecraft.client.gui.inventory.GuiContainer.public_func_73869_a(GuiContainer.java)
	at codechicken.nei.guihook.GuiContainerManager.callKeyTyped(GuiContainerManager.java)
	at codechicken.nei.guihook.GuiContainerManager.keyTyped(GuiContainerManager.java:636)
	at codechicken.nei.guihook.GuiContainerManager.handleKeyboardInput(GuiContainerManager.java:623)
	at net.minecraft.client.gui.inventory.GuiContainer.func_146282_l(GuiContainer.java)
	at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:276)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1640)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:973)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898)
	at net.minecraft.client.main.Main.main(SourceFile:148)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

crash-2024-07-01_19.20.24-client.txt

Mod version

HBM NTM 1.7.10 X5012

commented

and you aren't gonna send the actual crash report?

commented

and you aren't gonna send the actual crash report?

Whoops, somehow didn't get pasted properly. My bad.

commented

Weird issue, the crash log implies some ore dict entries might be null, which is a hard issue to track since any mod could be causing this. I'm just adding some more safeguards that print a generic error instead of crashing.