mojira.dev

Alex Fowler

Assigned

No issues.

Reported

No issues.

Comments

We had this pressing issue too, and here is some additional data that might help reproducing it:

  • Datapack with 32 994 recipes: 

[media]
  • ,

[media]
  • and

  • Datapack with 20 392 tags: 

[media]
  • ,

[media]

Each of the datapacks, if being used alone on a client-server Minecraft setup reveals the bug in the protocol.

The datapacks might seem large and unrealistic, but they are just test data generated by a script to illustrate the issue. In the real life scenario, as the OP says, we are not the first who is facing this problem. There were also a lot of mentions of this problem on Hypixel forums, Reddit and other resources.

Happenning now on a very stable and broad wire connection, even on LAN, so it's not about network problems. 

I have had it on both modded and vanilla versions, mainly 1.15.2 (because I never actually played the other ones except for a little of 1.12.2). Was getting both "below" and "above" versions of it. And this bug is there for several years already, just try to google for "badly compressed packet". This looks like either a bug in netty or in how Minecraft interacts with netty.

On a modded Minecraft (Forge) I was able to reproduce it by adding certain mods, and removing them removed the problem. My guess is that at some point the amount of information for a chunk or a packet gets too high and Minecraft does not handle it in any way. This happens in both vanilla and moded Minecraft.

 PS: Also, any kinds of log, the client log, the launcher log, the server log – don't contain any mention of this exception at all, as if it had never happened.

 

EDIT: Just did a little more searching and apparently this problem originates from: https://github.com/ObelouixServer/Minecraft-1.12/blob/master/temp/src/minecraft/net/minecraft/network/NettyCompressionDecoder.java where the maximum packet size is hardcoded for 2mb (a guess since I can't know what the obduscated functions really do), which is a pretty weird hardcoded limit? Maybe that was a thing tens of years ago when Minecraft appeared, but is there any need in that today? The games and game worlds become more complex and having a lot of data is a norm.. Or maybe is there an error in packet encoding that creates malformed packets? That would be the only reason to justify that check to ever exist there at all. So what is it?