mojira.dev
MC-133842

Crash when getting kicked while in Inventory

When opening the inventory and loosing the connection from the server (e.g. kicked from the console), the game crashes with the following crash report:

(18w31a) crash-2018-08-04_19.45.52-client.txt

Description: Unexpected error

java.lang.NullPointerException: Unexpected error
	at clm.n(SourceFile:218)
	at cfq.a(SourceFile:737)
	at cfq.a(SourceFile:1529)
	at cfq.a(SourceFile:1503)
	at cra.a(SourceFile:715)
	at hx.l(SourceFile:396)
	at crc.d(SourceFile:272)
	at cfq.m(SourceFile:1223)
	at cfq.c(SourceFile:821)
	at cfq.a(SourceFile:395)
	at net.minecraft.client.main.Main.main(SourceFile:144)

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 3

Can confirm, After I using /team command and setting up prefix/color. The game will crash or kick player from realms.

Some code analysis based on MCPConfig for 1.13:

The last method in the stacktrace (called GuiInventory#onGuiClosed in MCP) is checking if the player is in creative mode to clean up the recipe book state. But the PlayedControllerMP is already null because we lost the connection to the remote server, and because GuiInventory doesn't handle a null PlayerControllerMP, the game crashes with an NPE

Can no longer reproduce in 18w32a

Tobias Hotz

(Unassigned)

Community Consensus

Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w31a

Minecraft 18w32a

Retrieved