Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Data cap causes decoder exception and kicks player from servers. #284

Open
Zilacon opened this issue Oct 2, 2020 · 0 comments
Open

Data cap causes decoder exception and kicks player from servers. #284

Zilacon opened this issue Oct 2, 2020 · 0 comments

Comments

@Zilacon
Copy link

Zilacon commented Oct 2, 2020

What Hexacord version are you using? Post the output of /bungee

Latest

Are you using Bungee plugins? If yes, please list all of them + versionnumber

Reproduced with no plugins.

How can we reproduce the error/bug?

Add a large modpack like MC:Eternal to the bungeecord, start exploring around in chunks with many modded blocks and entities. Get the error.

Is an error message (bungee/spigot/client)? If yes, use pastebin.com and share the link.

The error shows on client and server, but not on bungeecord.

In addidtion to that, please explain your issue as detailed as possible.

Modded servers in newer versions of minecraft are sending too much data to the bungee/client and vice versa which causes a decoder exception. These exceptions are coming from the entity maps for bungeecord as specific length and limits are specified for each version in the entity maps. Once this limit is exceeded, you get a decoder exception.

This issue is more rare on 1.7.10 then it is on 1.12.2 or above. As 1.7.10 doesnt allow NBT data for blocks or entities, only UUID's. So the amount of data has increased but not by much compared to newer versions.

This error can be reproduced infinitely once its been triggered once. As long as you are in the same chunk as when the error originated you will continue to get the error and get kicked. If you get moved, to lets say, spawn. But you go back to where you errored, you repeat the process all over again.

Here is an example of the error:
[15:49:44] [Server thread/INFO]: LuckIThonkNut lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(4) + length(1) exceeds writerIndex(4): PooledUnsafeDirectByteBuf(ridx: 4, widx: 4, cap: 4)

You can find this here:
https://github.com/HexagonMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_1_7_2.java#L85-L93
https://github.com/HexagonMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_1_7_2.java#L53-L61

And im sure you can find the same thing on many other entity map files.
How can this be fixed?

Server softwares issue reproduced on:
Thermos
Crucible
Magma
Catserver
Mohist
Forge+Sponge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant