Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-252502

XML_ERROR_PARSING_CDATA error when null character appears in chat

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19 Release Candidate 2, 1.19, 22w24a, 1.19.1 Pre-release 1, 1.19.1 Release Candidate 1, 1.19.1 Pre-release 2, 1.19.1 Pre-release 3, 1.19.1 Pre-release 4, 1.19.1 Pre-release 5, 1.19.1 Pre-release 6, 1.19.1 Release Candidate 2, 1.19.1, 1.19.2, 22w42a, 22w43a, 22w44a, 22w45a, 22w46a, 1.19.3 Pre-release 1, 1.19.3 Pre-release 2, 1.19.3 Pre-release 3, 1.19.3 Release Candidate 1, 1.19.3 Release Candidate 2, 1.19.3 Release Candidate 3, 1.19.3, 23w03a, 23w04a, 23w05a, 23w06a, 23w07a, 1.19.4 Pre-release 1, 1.19.4 Pre-release 2, 1.19.4 Pre-release 3, 1.19.4 Pre-release 4, 1.19.4 Release Candidate 1, 1.19.4 Release Candidate 2, 1.19.4 Release Candidate 3, 1.19.4, 23w12a, 23w13a, 23w14a, 23w16a, 23w17a, 23w18a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 4, 1.20 Pre-release 5, 1.20 Pre-release 6, 1.20 Pre-release 7, 1.20 Release Candidate 1, 1.20, 1.20.1 Release Candidate 1, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 2, 1.20.2 Pre-Release 3, 1.20.2 Pre-Release 4, 1.20.2 Release Candidate 1, 1.20.2 Release Candidate 2, 1.20.2, 23w40a, 23w41a, 23w42a, 23w43a, 23w43b, 23w44a, 23w45a, 23w46a, 1.20.3 Pre-Release 1, 1.20.3 Pre-Release 2, 1.20.3 Pre-Release 3, 1.20.3 Pre-Release 4, 1.20.3 Release Candidate 1, 1.20.3, 1.20.4 Release Candidate 1, 1.20.4, 23w51b, 24w03a, 24w03b, 24w04a, 24w05a, 24w06a, 24w07a, 24w09a, 24w10a, 24w11a, 24w12a, 24w13a, 24w14a, 1.20.5 Pre-Release 1, 1.20.5 Pre-Release 2, 1.20.5 Pre-Release 3, 1.20.5 Pre-Release 4, 1.20.5 Release Candidate 1, 1.20.5 Release Candidate 2, 1.20.5
    • None
    • Confirmed
    • Text
    • Normal
    • Platform

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

      <log4j:Event logger="net.minecraft.server.MinecraftServer" timestamp="1654584991672" level="INFO" thread="Server thread">
          <log4j:Message><![CDATA[<> hi]]></log4j:Message>
        </log4j:Event>
      XML_ERROR_PARSING_CDATA
      <log4j:Event logger="egt" timestamp="1654584991679" level="INFO" thread="Render thread">
          <log4j:Message><![CDATA[[CHAT] [] hi]]></log4j:Message>
        </log4j:Event>
      XML_ERROR_PARSING_CDATA

      An example of how you can reproduce this:

      1. Summon an entity, such as an Armor Stand, with it's name being the Unicode value for null. (Running the following command in chat also gives the error, but in a command block it does not. I was testing using a command block.)
      /summon minecraft:armor_stand ~ ~ ~2 {CustomName:'{"text":"\\u0000"}', CustomNameVisible:1b} 

      2. Run a command that will cause the null character to show up in chat, such as

      /execute as @e[type=minecraft:armor_stand, limit=1] run say hi 

      The game output now shows the error shown above.

            Unassigned Unassigned
            mattp_12 mattp_12
            Votes:
            12 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: