mojira.dev
MC-250919

The server crashes when attempting to load chunks that contain command blocks that consist of large numbers of characters within the previous output field

The Bug:

The server crashes when attempting to load chunks that contain command blocks that consist of large numbers of characters within the previous output field.

The full server console log and a crash report regarding this have been attached and can be found below.

Stack Trace:

[^crash-2022-04-27_10.42.38-server.txt]

Description: Exception generating new chunk

java.io.EOFException
    at java.base/java.io.DataInputStream.readUnsignedShort(DataInputStream.java:346)
    at pq.a(SourceFile:54)
    at pq$1.a(SourceFile:34)
    at oz$1.a(SourceFile:136)
    at pu$b.a(SourceFile:50)
    at pf$1.a(SourceFile:91)
    at oz$1.a(SourceFile:96)
    at pj.a(SourceFile:120)
    at cvr.a(SourceFile:65)
    at cvo.b(SourceFile:218)
    at cvo.a(SourceFile:231)
    at awt$b.run(SourceFile:59)
    at awr.h(SourceFile:91)
    at awr.a(SourceFile:146)
    at awr.run(SourceFile:102)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)

Steps to Reproduce:

  • Launch a server running 22w16b that has command blocks enabled and join it.

  • Unlock all recipes within the game by executing the command provided below.

/recipe give @s *
  • Summon a repeating command block nearby that will constantly get the data of your player.

/setblock ~ ~ ~3 minecraft:repeating_command_block{auto:1b,Command:"data get entity @p"}
  • Leave the game, shut down the server, and reboot it.

  • Take note as to whether or not the server crashes when attempting to load chunks that contain command blocks that consist of large numbers of characters within the previous output field.

Observed Behavior:

The server crashes.

Expected Behavior:

The server would not crash.

Attachments

Comments 4

This ticket closely relates to MC-250918.

I've tested this in 1.18.2, and the behavior is slightly different, so I haven't marked this version as affected, just in case. In 1.18.2, while the server doesn't crash when attempting to start, the chunk that contained the command block is completely reset.

In singleplayer, this also might cause the world to be locked and disappear from the list.

Avoma

boq

Confirmed

Very Important

Crash

22w16b, 22w17a

1.19 Pre-release 1

Retrieved