The bug
The JSON text component parser throws unhandled exceptions when data of an incorrect type was provided. For example:
"text":[]"text":"","extra":1
When using this while typing in chat the client crashes with the description keyPressed event handler, in command blocks the exception is written to the log.
[^(17w45b) crash-2017-11-10_22.17.47-client.txt]
Description: charTyped event handler
java.lang.ClassCastException: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonObject
at com.google.gson.JsonObject.getAsJsonObject(JsonObject.java:191)
...[^(17w45b) crash-2017-11-10_22.26.44-client.txt]
Description: charTyped event handler
java.lang.ClassCastException: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonArray
at com.google.gson.JsonObject.getAsJsonArray(JsonObject.java:181)
...[^(17w45b) crash-2017-11-10_22.31.10-client.txt]
Description: keyPressed event handler
java.lang.IllegalStateException
at com.google.gson.JsonArray.getAsString(JsonArray.java:215)
...How to reproduce
Use the following command
/setblock ~ ~ ~ command_block{Command:"/tellraw @p {\"text\":[]}",auto:1b}Look in the log
Is this still an issue in 18w01a?