NotEnoughUpdates icon indicating copy to clipboard operation
NotEnoughUpdates copied to clipboard

Two random crashes caused by NEU

Open TheDGOfficial opened this issue 3 years ago • 0 comments

One while opening trade menu (crashed right after clicking accept trade in chat):

java.lang.NullPointerException: Updating screen events
	at io.github.moulberry.notenoughupdates.miscgui.TradeWindow.handleMouseInput(TradeWindow.java:981)
	at io.github.moulberry.notenoughupdates.NEUEventListener.onGuiScreenMouse(NEUEventListener.java:1220)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_19_NEUEventListener_onGuiScreenMouse_Pre.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140)
	at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:523)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1674)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1024)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349)
	at net.minecraft.client.main.Main.main(SourceFile:124)
	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)

(Using latest 1.8.9 forge build 2318)

Caused by: https://github.com/Moulberry/NotEnoughUpdates/blob/06c3c7fcfd8f65e2a30f81626457f4180ea52a36/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java#L981

(Autoboxing null value)

Other while PV'ing someone and switching to Pets page:

java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:542)
	at java.lang.Integer.parseInt(Integer.java:615)
	at io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer.lambda$drawPetsPage$2(GuiProfileViewer.java:1136)
	at java.util.TimSort.binarySort(TimSort.java:296)
	at java.util.TimSort.sort(TimSort.java:221)
	at java.util.Arrays.sort(Arrays.java:1512)
	at java.util.ArrayList.sort(ArrayList.java:1462)
	at io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer.drawPetsPage(GuiProfileViewer.java:1133)
	at io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer.func_73863_a(GuiProfileViewer.java:228)
	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:311)
	at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.optifine.reflect.Reflector.callVoid(Reflector.java:537)
	at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1437)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1051)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349)
	at net.minecraft.client.main.Main.main(SourceFile:124)
	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)

Caused by: https://github.com/Moulberry/NotEnoughUpdates/blob/06c3c7fcfd8f65e2a30f81626457f4180ea52a36/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java#L1136

(Trying to parse null value as integer)

Root cause maybe here: https://github.com/Moulberry/NotEnoughUpdates/blob/06c3c7fcfd8f65e2a30f81626457f4180ea52a36/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java#L1101

Maximum is LEGENDARY, but there is also a MYTHIC rarity now. So this maybe the reason it was returning null but I'm not sure.

TheDGOfficial avatar Jun 13 '21 14:06 TheDGOfficial