astei / krypton

A Fabric mod that optimizes the Minecraft networking stack and entity tracker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data is bad and VarInt too big

bugescape opened this issue · comments

Description
We have a server hosting on modpack "Medieval MC Fabric" and this mod is included in the modpack, after recent update there are a lot of reports about player been occasionally disconnected by the server and error log shows "Data is bad" and "VarInt too big" and we believe this mod could be the cause of such issue, see screenshot below

https://cdn.discordapp.com/attachments/1028642533795971173/1028642699466776656/unknown.png

https://cdn.discordapp.com/attachments/1028642533795971173/1028642720136314930/unknown.png

Solution
Removing the mod seems fixed it but will keep update if any issues

Other mods:

Its a big modpack so for other mods please see below link:

https://www.curseforge.com/minecraft/modpacks/medieval-mc-fabric/files/4016392

There are 505 mods in this modpack. How do you expect me to narrow down what combination of those mods is causing the incompatibility?

Something tells me you need to take the difference of mods that were updated and work from there, not have me do that.

I just encountered this with a slightly smaller modpack: https://mclo.gs/ZN3Gyfj
It might be a conflict with Very Many Players or Raknetify?

Sorry to necro this, but it may indeed be a compat issue.

TonimatasDEV/PacketFixer#21

Yes, I realize I'm also using a stupidly large pack, albeit of my own making, but the error is pretty much the same.

Krypton does, in fact, hardcode support for Vanilla data sizes. So if you're trying to use a mod that extends the amount of data a packet can encode, then you're not going to be in luck. (In fact, Velocity won't support extended packet sizes either - it will try to encode packet sizes as a 21-bit VarInt, just as Vanilla expects.)

It is possible to modify Krypton to support larger packet sizes than those supported by Vanilla, but that is a separate issue.

I added the system property krypton.permit-oversized-packets for this. Just add -Dkrypton.permit-oversized-packets=true as a JVM option, and this should fix the issue on the Krypton side.

This setting isn't enabled by default and is harder to get to because it will result in laughably easy denial of service attacks, but if you're willing to take the risk, the option is there.