mojira.dev
MC-252502

XML_ERROR_PARSING_CDATA error when null character appears in chat

When the null Unicode character appears in chat, the game output shows the error

<log4j:Event logger="fin" timestamp="1723129374266" level="INFO" thread="Render thread">
    <log4j:Message><![CDATA[[System] [CHAT] ]]></log4j:Message>
  </log4j:Event>
XML_ERROR_PARSING_CDATA

An example of how you can reproduce this:

Run command 

/tellraw @s "\u0000"

The game output now shows the error shown above.

Linked issues

Comments 2

Confirmed in 23w46a.

[@: Summoned new <log4j:Event logger="net.minecraft.server.MinecraftServer" timestamp="1700532409097" level="INFO" thread="Server thread"> <log4j:Message><![CDATA[[Not Secure] [ <log4j:Event logger="ewz" timestamp="1700532409148" level="INFO" thread="Render thread"> <log4j:Message><![CDATA[[System] [CHAT] [@: Summoned new <log4j:Event logger="ewz" timestamp="1700532409149" level="INFO" thread="Render thread"> <log4j:Message><![CDATA[[System] [CHAT] [ <log4j:Event logger="gie" timestamp="1700532413116" level="INFO" thread="Server thread">

Simplified description and how to reproduce

mattp12

(Unassigned)

Confirmed

Platform

Normal

Text

1.19 Release Candidate 2, 1.19, 22w24a, 1.19.1 Pre-release 1, 1.19.1 Release Candidate 1, ..., 24w45a, 24w46a, 1.21.4 Pre-Release 1, 1.21.4 Release Candidate 3, 1.21.4

Retrieved