mojira.dev
MC-124545

Malformed JSON as 'name' value for 'show_entity' hoverEvent causes crash

The bug

The game crashes if the name value of show_entity hoverEvent value is invalid JSON.

[^(18w03b) crash-2018-01-28_19.33.31-client.txt]

Description: Rendering screen

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
	at com.google.gson.internal.Streams.parse(Streams.java:60)
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:65)
	at vg.a(SourceFile:493)
	at vg.a(SourceFile:518)
	at ho$a.a(SourceFile:241)
	at brs.a(SourceFile:218)
	at bqv.a(SourceFile:340)
	at cau.a(SourceFile:990)
	at bob.b(SourceFile:822)
	at bob.a(SourceFile:382)
	at net.minecraft.client.main.Main.main(SourceFile:140)

How to reproduce

  1. Run the command

    /tellraw @p {"text":"hover","hoverEvent":{"action":"show_entity","value":"{\"name\":\"This is invalid JSON\",\"type\":\"minecraft:ender_crystal\",\"id\":\"00000000-0000-0000-0000-000000000000\"}"}}
  2. Hover over the text

Linked issues

Attachments

Comments 0

No comments.

ValentiMS

boq

Confirmed

hoverEvent, show_entity, text-component

Minecraft 18w03b, Minecraft 18w07c, Minecraft 1.13-pre2, Minecraft 1.13-pre3

Minecraft 1.13-pre5

Retrieved