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.
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
- 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\"}"}} - Hover over the text
Created Issue:
'show_entity' hoverEvent causes crash.
The Bug
I know there was a bug recently where the game would crash when obtaining items with malformed JSON. Well, recently I got a crash when using the 'show_entity' hoverEvent. Resulting in: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException
I know the JSON might be wrong but I wanted to report the bug to show the crash.Steps to reproduce
1. Run the command /tellraw ValentiMS {"text":"CRASH","hoverEvent":{"action":"show_entity","value":"
{name:\"Entity\",type:\"Creeper\",id:\"00000000-0000-0000-0000-000000000000\"}"}}
2. Hover over the text
3. It should crash instantlyEnvironment
Windows 10 Java 1.8.0_131
The Bug
I know there was a bug recently where the game would crash when obtaining items with malformed JSON. Well, recently I got a crash when using the 'show_entity' hoverEvent. Resulting in: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException
I know the JSON might be wrong but I wanted to report the bug to show the crash.Steps to reproduce
1. Run the command /tellraw
{name:\"Entity\",type:\"Creeper\",id:\"00000000-0000-0000-0000-000000000000\"}ValentiMS{"text":"CRASH","hoverEvent":{"action":"show_entity","value":""}}
2. Hover over the text
3. It should crash instantlyThe Bug
I know there was a bug recently where the game would crash when obtaining items with malformed JSON. Well, recently I got a crash when using the 'show_entity' hoverEvent. Resulting in: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException
I know the JSON might be wrong but I wanted to report the bug to show the crash.Steps to reproduce
1. Run the command /tellraw @s {"text":"CRASH","hoverEvent":{"action":"show_entity","value":"
{name:\"Entity\",type:\"Creeper\",id:\"00000000-0000-0000-0000-000000000000\"}"}}
2. Hover over the text
3. It should crash instantly
The Bug
I know there was a bug recently where the game would crash when obtaining items with malformed JSON. Well, recently I got a crash when using the 'show_entity' hoverEvent. Resulting in: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException
I know the JSON might be wrong but I wanted to report the bug to show the crash.Steps to reproduce
1. Run the command /tellraw @
{name:\"s{"text":"CRASH","hoverEvent":{"action":"show_entity","value":"Entity\",type:\"Creeper\",id:\"00000000-0000-0000-0000-000000000000\"}"}}
2. Hover over the text
3. It should crash instantlyThe Bug
I know there was a bug recently where the game would crash when obtaining items with malformed JSON. Well, recently I got a crash when using the 'show_entity' hoverEvent. Resulting in: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException
I know the JSON might be wrong but I wanted to report the bug to show the crash.Steps to reproduce
1. Run the command /tellraw @p {"text":"CRASH","color":"dark_red","hoverEvent":{"action":"show_entity","value":"
{name:\"CRASH\",type:\"minecraft:ender_crystal\",id:\"00000000-0000-0000-0000-000000000000\"}"}}
2. Hover over the text
3. It should crash instantly
The
BugI know there was a bug recently where the game would crash when obtaining items with malformed JSON. Well, recently I got a crash when using the 'show_entity' hoverEvent. Resulting in: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException
I know the JSON might be wrong but I wanted to report the bug to show the crash.Steps to reproduce
1. Run the command /tellraw @p {"text":"CRASH","color":"dark_red","hoverEvent":{"action":"show_entity","value":"
{name:\"CRASH\",type:\"minecraft:ender_crystal\",id:\"00000000-0000-0000-0000-000000000000\"}"}}
2. Hover over the text
3. It should crash instantlyThe bug
The game crashes if the name value of show_entity hoverEvent value is invalid JSON.
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)Steps to reproduce
- 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\"}"}}- Hover over the text
'show_entity' hoverEvent causes crash.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.
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)
Stepsto reproduce
- 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\"}"}}- Hover over the text
The bug
The game crashes if the name value of show_entity hoverEvent value is invalid JSON.
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
- 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\"}"}}- Hover over the text
relates to
is duplicated by
is duplicated by
I just noticed this has already been reported here: MC-124545, I closed this ticket as a duplicate of that report.