Mojira Archive
MC-269761

Modified creative mode client can cause chunk save error floods

A modified creative mode client can send items with max_stack_size less than 1/larger than 99 because the network has no limit applied to the value, contrary to the persistent codec. However, when a chunk with such an item attempts a save, an error will be logged on every new save attempt until shutdown. The same applies to a whole lot of other data components, the ones I saw are where any value is a (raw) number type

One such example to run on an ItemStack on the (non-op) client to join a vanilla server is setting the following data component:

this.components.set(DataComponents.MAX_STACK_SIZE, 500);

The error will look similar to this, depending on the type of data component

[16:34:43] [Server thread/ERROR]: Failed to save chunk 4,-8
java.lang.IllegalStateException: Value must be within range [1;99]: 500
    at ac.a(SourceFile:1050) ~[24w12a.jar:?]
    at csz.b(SourceFile:344) ~[24w12a.jar:?]
    at bpg.a(SourceFile:43) ~[24w12a.jar:?]
    at bpg.a(SourceFile:33) ~[24w12a.jar:?]
    at dnt.b(SourceFile:92) ~[24w12a.jar:?]
    at dnm.d(SourceFile:86) ~[24w12a.jar:?]
    at dnm.b(SourceFile:66) ~[24w12a.jar:?]
    at dsn.a(SourceFile:390) ~[24w12a.jar:?]
    at dtj.a(SourceFile:330) ~[24w12a.jar:?]
    at apq.a(SourceFile:840) ~[24w12a.jar:?]
    at apq.d(SourceFile:804) ~[24w12a.jar:?]
    at apq.b(SourceFile:515) ~[24w12a.jar:?]
    at apq.a(SourceFile:470) ~[24w12a.jar:?]
    at aqf.a(SourceFile:328) ~[24w12a.jar:?]
    at aqh.a(SourceFile:348) ~[24w12a.jar:?]
    at net.minecraft.server.MinecraftServer.b(SourceFile:994) ~[24w12a.jar:?]
    at net.minecraft.server.MinecraftServer.a(SourceFile:885) ~[24w12a.jar:?]
    at grd.a(SourceFile:113) ~[24w12a.jar:?]
    at net.minecraft.server.MinecraftServer.y(SourceFile:687) ~[24w12a.jar:?]
    at net.minecraft.server.MinecraftServer.a(SourceFile:272) ~[24w12a.jar:?]
    at java.base/java.lang.Thread.run(Thread.java:833) [?:?]

 

The attached image is from an unmodded survival mode client on the server 24w12a vanilla server.

Fixed

[Mod] Nassim Jahnke

[Mojang] Gegy

2024-03-22, 04:03 PM

2024-04-08, 07:59 AM

2024-04-08, 07:59 AM

2

3

Plausible

Very Important

Platform

Crash, Networking

24w12a, 24w14a

1.20.5 Pre-Release 1