mojira.dev
MC-124174

Game crash when give yourself an item with empty name

The bug

Running the command

/give @p minecraft:diamond_sword{display:{Name:""}}

will say "An unexpected error occurred trying to execute that command" but will still give you the item. When you hold it, the game will crash.

Crash report

18w02a\: [^crash-2018-01-11_19.24.11-client.txt]

Description: Rendering screen

java.lang.NullPointerException: Rendering screen
	at anw.a(SourceFile:554)
	at brs.a(SourceFile:99)
	at brs.a(SourceFile:95)
	at bsw.a(SourceFile:686)
	at bsn.b(SourceFile:176)
	at bsw.a(SourceFile:643)
	at cau.a(SourceFile:990)
	at bob.b(SourceFile:822)
	at bob.a(SourceFile:382)
	at net.minecraft.client.main.Main.main(SourceFile:140)

Linked issues

Attachments

Comments 13

The game crash also occurs whenever the section sign (§) is used inside of a name or lore of an item (using the symbol in functions allows for color codes to work).

Confirmed for 18w11a.

Added a crash report for when an item with a section sign crashes the game, it results in a NullPointerException as well but the description that goes along with it is different, that being "Exception ticking world".

The game crash also occurs whenever the section sign (§) is used inside of a name or lore of an item (using the symbol in functions allows for color codes to work).

Cannot confirm that, also, that'd be a separate bug.

@FVbico https://bugs.mojang.com/browse/MC-123839 was reported and resolved as a duplicate of https://bugs.mojang.com/browse/MC-123782 , and this was marked as relating to this bug and fixed. One of those two bugs should likely be reopened as they were not completely solved.

3 more comments

Still affects 18w22c, I attached a crash report of it. In one instance for me it saved the world just before closing it out, resulting in Minecraft crashing upon trying to reopen the world.

still in 1.13-pre2

The game still crash when give an item with empty name

Confirmed not fixed in 1.13-pre2.

Was incorrectly marked as fixed in pre2 - fix was delivered after branch-out.

I am still having the error in 1.14.2, it also seems to effect the name field of the attribute effects of items.

PlanetNebulirion

boq

Confirmed

item-Name, text-component

Minecraft 18w02a, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w11a, Minecraft 18w20b, Minecraft 18w22a, Minecraft 18w22b, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2

Minecraft 1.13-pre3

Retrieved