The bug
When a command block is full of characters that take more than 1 byte to store, the chunk that command block is in gets corrupted.
How to reproduce
Place a command block down.
Copy and paste this symbol "■" into the command block until the command block is full.
Save and quit to title.
Get back in the world.
→ ❌ The chunk the command block was in is re-generated; resetting everything in it
Note
■ is not the only character this works with.
Game output error message
Failed to store chunk [7, 1]
java.io.UTFDataFormatException: encoded string (■■■■■■■■...■■■■■■■■) too long: 97500 bytes
at java.base/java.io.DataOutputStream.writeUTF(DataOutputStream.java:368)
at java.base/java.io.DataOutputStream.writeUTF(DataOutputStream.java:332)
at nq.a(SourceFile:65)
at na.a(SourceFile:415)
at na.a(SourceFile:104)
at ng.a(SourceFile:81)
at na.a(SourceFile:415)
at na.a(SourceFile:104)
at na.a(SourceFile:415)
at na.a(SourceFile:104)
at nk.a(SourceFile:95)
at nk.a(SourceFile:83)
at cnq.a(SourceFile:70)
at cnm.a(SourceFile:153)
at cnm.a(SourceFile:143)
at ara$b.run(SourceFile:61)
at aqy.g(SourceFile:91)
at aqy.a(SourceFile:146)
at aqy.run(SourceFile:102)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Video
https://youtu.be/C4t2avl0Dhw
(Video by Phoenix SC)
Attachments
Comments 15
I was able to reproduce this in both 21w11a and 1.16.5. Additionally, after you click "Done" on the command block, the launcher crashes. The game itself (Java) remains open. It's easiest to notice the launcher crashing if you have the launcher log open (by selecting "Open output log when Minecraft: Java Edition starts" in the launcher settings before you launch the game). However, even if you don't have the launcher log open, you can still observe the launcher crashing by watching Activity Monitor (on macOS) or Task Manager (on Windows).
Perhaps this report should be moved to the MCL project? Or maybe a separate MCL report should be created and linked to this report? I'm unsure whether the chunk resetting is a side-effect of the launcher crashing, or if it is a separate issue.
After discussing this on the Mojira Discord, I created a separate report about the launcher crash: MCL-17439.
I can confirm this in 1.19 Pre-release 1. I reproduced this issue using the steps provided in MC-250918 and rebooting the server whilst the command block was still present in the world. Here's the server log.
[media]
You are overloading the chunk with information. When you do this, it resets to its latest save.