MamiyaOtaru / voxelmap

Zan's Minimap to VoxelMap. The changes from when I started working to the initial VoxelMap release for 1.4.7
26 stars 7 forks source link

[1.16.1] Disconnected from server on join due to Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException #37

Open tanyan-tanyan opened 4 years ago

tanyan-tanyan commented 4 years ago

When attempting to join a 1.16.1 Forge server with VoxelMap, I am able to join for a second and then I immediately get disconnected for the following error:

Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(23) + length(8) exceeds writerIndex(23): PooledUnsafeDirectByteBuf(ridx:23, widx: 23, cap:23)

The issue persisted on every server connection attempt until I removed VoxelMap. The server console log indicates VoxelMap is having issues with packets:

←[m←[32m[22:28:56] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@76e44133
←[m←[32m[22:28:56] [Server thread/INFO] [minecraft/PlayerList]: Dinges360[/IP] logged in with entity id 11271 at (-1126.7410381386183, 75.875, -2602.6539308288798)
←[m←[32m[22:28:56] [Server thread/INFO] [minecraft/DedicatedServer]: Dinges360 joined the game
←[m←[1;31m[22:28:56] [Netty Server IO #7/ERROR] [minecraft/ArgumentTypes]: Could not serialize net.minecraftforge.server.command.ModIdArgument@2da9e1bf (class net.minecraftforge.server.command.ModIdArgument) - will not be sent to client!
←[m←[1;31m[22:28:56] [Netty Server IO #7/ERROR] [minecraft/ArgumentTypes]: Could not serialize net.minecraftforge.server.command.EnumArgument@594d30f3 (class net.minecraftforge.server.command.EnumArgument) - will not be sent to client!
←[m←[32m[22:28:58] [Server thread/INFO] [STDERR/]: [com.mamiyaotaru.voxelmap.forgemod.WorldIDPacket:decode:45]: Failed to read message: java.lang.IndexOutOfBoundsException: readerIndex(2) + length(42) exceeds writerIndex(3): PooledUnsafeDirectByteBuf(ridx: 2, widx: 3, cap: 3)
←[m←[32m[22:29:02] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Dinges360 lost connection: Disconnected
←[m←[32m[22:29:02] [Server thread/INFO] [minecraft/DedicatedServer]: Dinges360 left the game

I am also including a link to my forge support thread on the same issue which is where I was able to pinpoint that it was voxelmap. You can find latest and debug logs there although I don't know if this will be helpful. https://forums.minecraftforge.net/topic/89510-1161-internal-exception-ionettyhandlercodecdecoderexception-javalangindexoutofboundsexception-readerindex23-length8-exceeds-writerindex23-pooledunsafedirectbytebufridx23-widx-23-cap23/