mojira.dev
MC-79990

/tellraw @p {"text":null} - Error in log

Minecraft still isn't testing if the value is null before performing the command (but doesn't crash anymore):

{code:title=/tellraw @p {"text":null}}
[00:52:11] [Server thread/WARN]: Couldn't process command: 'tellraw @p {"text":null}'


This bug report was based off of the comment by Marcono1234 on MC-36867

Linked issues

Attachments

Comments

kumasasa

Fixed in 1.9: In 15w35e the error message Invalid json: malformed JSON at line 1 column 3 is thrown.

marcono1234

@unknown, that happened very likely because JSON was strict in 15w35e. Adding double quotes around text shows

An unknown error occurred while attempting to perform this command

bemoty

Can confirm for MC 1.12.1.

Couldn't process command: tellraw @p {"text":null}
java.lang.UnsupportedOperationException: JsonNull
	at com.google.gson.JsonElement.getAsString(JsonElement.java:191)
	at hh$a.a(SourceFile:62)
	at hh$a.deserialize(SourceFile:41)
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
	at rc.a(SourceFile:492)
	at rc.a(SourceFile:517)
	at hh$a.a(SourceFile:212)
	at du.a(SourceFile:44)
	at bj.a(SourceFile:92)
	at bj.a(SourceFile:70)
	at pa.c(SourceFile:850)
	at pa.a(SourceFile:837)
	at la.a(SourceFile:37)
	at la.a(SourceFile:9)
	at hv$1.run(SourceFile:13)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at h.a(SourceFile:46)
	at net.minecraft.server.MinecraftServer.D(SourceFile:604)
	at net.minecraft.server.MinecraftServer.C(SourceFile:560)
	at chd.C(SourceFile:154)
	at net.minecraft.server.MinecraftServer.run(SourceFile:464)
	at java.lang.Thread.run(Thread.java:745)
Oval

Issue has been fixed for 1.13.1 since the command updates.

1.13.1: /tellraw @p [{"text":"null"}]
kumasasa

@unknown,

/tellraw @p {"text":"null"}

is something completely different than

/tellraw @p {"text":null}

Nevertheless, it's no longer possible to enter

{"text":null}

clunker5

(Unassigned)

Confirmed

Minecraft 1.8.4, Minecraft 16w42a, Minecraft 1.11.2, Minecraft 1.12.1

Minecraft 15w35e, Minecraft 1.13.1

Retrieved