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

The server cannot send the client the system_chat packet containing deeply nested NBT data

XMLWordPrintable

    • Plausible
    • Networking
    • Important
    • Platform

      Description of Bug

      When the player executes the specific command and refers over 427 times (Vanilla Integrated Server; The Dedicated server is 389. This value may be changed if the server is modified, or you are running other method or environment) nested NBT data, the server cannot send the clientbound/minecraft:system_chat packet with throwing java.lang.StackOverflowError and the error message shows to player.

      This bug starts to affect since 24w09a.

      Steps To Reproduce

      Using Data Storage (Better Method)

      • Integrated Server: over 400 times nested
      • Dedicated Server: over 207 times nested
      1. Configure a server after 24w09a version or join the singleplayer world
      2. Run the command using a Command Block or a Datapack function:
        data modify storage mc-269173 data set value [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
        
      3. Also run the command in the chat HUD:
        data get storage mc-269173 data
        
      4. See the disconnection screen

      Using HandItems of Mob (TL; DR)

      • Integrated Server: over 427 times nested
      • Dedicated Server: over 389 times nested
      1. Set up a server after 24w09a version or join the singleplayer world. If you are creating a new singleplayer world, the recommended Superflat world preset is The Void.
      2. Kill all Husks already summoned
      3. Summon the Husk that hold some item, like this:
        summon husk ~ ~.5 ~ {NoAI:true,Silent:true,Tags:["test"],HandItems:[{id:"diamond",components:{custom_data:{test:{}}}}]}
        
      4. Place a Repeating Command Block and a Lever, the command is
        execute as @e[tag=test] run data modify entity @s HandItems[0].components.minecraft:custom_data.test.test set from entity @s HandItems[0].components.minecraft:custom_data.test
        
      5. Freeze the game ticking using tick freeze command
      6. Activate the Lever
      7. Make to run the game during over about 450 ticks using tick step 450 command.
      8. Run the command:
        data get entity @e[type=husk,limit=1] HandItems[0].components.minecraft:custom_data.test
        
      9. See the following message displays:
        Can't deliver chat message, check server logs: EntityName has the following entity data: {tag: {tag: {tag: {tag: ...}}}}
        

      Expected Result

      If running the data get command mentioned above, the queried overall NBT as a result should be displayed correctly.

      Attachments

      Attachment 1

      latest-1.log
      The log file of the Vanilla Dedicated Server.

      See Also

      • MC-269171 - The client is disconnected when receiving the system_chat packet containing deeply nested NBT data
      • MC-264510 - NBT paths can create NBTs that exceed depth limit
      • MC-261376 - Elements in a numeric array tag at the deepest level can be retrieved, but not be set
      • MC-201769 - Copying deeply nested NBT causes StackOverflowError

            gegy1000 [Mojang] Gegy
            NoEul NoEul
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: