Equivalent Exchange 3

Equivalent Exchange 3

2M Downloads

NBT Data Packet Overflow in Bag

Unknown-88 opened this issue ยท 4 comments

commented

If you put a large amount of NBT heavy items, for example about 60 full ae2 disks... Well this happens. I know this is not specifically the bags fault, but potentially it could stop excepting items if it is approaching the limit for too many nbt tags?

[16:38:44] [Netty Client IO #7/ERROR] [FML]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.EOFException
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:263) ~[ByteToMessageDecoder.class:?]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:131) ~[ByteToMessageDecoder.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) [ByteToMessageDecoder.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) [ReadTimeoutHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) [AbstractNioByteChannel$NioByteUnsafe.class:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) [NioEventLoop.class:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) [NioEventLoop.class:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) [NioEventLoop.class:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
Caused by: java.io.EOFException
at java.util.zip.GZIPInputStream.readUByte(Unknown Source) ~[?:1.8.0_45]
at java.util.zip.GZIPInputStream.readUShort(Unknown Source) ~[?:1.8.0_45]
at java.util.zip.GZIPInputStream.readHeader(Unknown Source) ~[?:1.8.0_45]
at java.util.zip.GZIPInputStream.(Unknown Source) ~[?:1.8.0_45]
at java.util.zip.GZIPInputStream.(Unknown Source) ~[?:1.8.0_45]
at net.minecraft.nbt.CompressedStreamTools.func_152457_a(CompressedStreamTools.java:60) ~[du.class:?]
at net.minecraft.network.PacketBuffer.func_150793_b(SourceFile:89) ~[et.class:?]
at net.minecraft.network.PacketBuffer.func_150791_c(SourceFile:116) ~[et.class:?]
at net.minecraft.network.play.server.S30PacketWindowItems.func_148837_a(SourceFile:34) ~[go.class:?]
at net.minecraft.util.MessageDeserializer.decode(SourceFile:40) ~[ez.class:?]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:232) ~[ByteToMessageDecoder.class:?]
... 16 more
[16:38:44] [Netty Client IO #7/INFO] [THAUMCRAFT]: Restoring client configs.
[16:38:44] [Netty Client IO #7/ERROR] [FML]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.IOException: Packet was larger than I expected, found 34411 bytes extra whilst reading packet 0
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:263) ~[ByteToMessageDecoder.class:?]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:196) ~[ByteToMessageDecoder.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelInactive(DefaultChannelHandlerContext.java:237) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelInactive(DefaultChannelHandlerContext.java:223) [DefaultChannelHandlerContext.class:?]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:214) [ByteToMessageDecoder.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelInactive(DefaultChannelHandlerContext.java:237) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelInactive(DefaultChannelHandlerContext.java:223) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75) [ChannelInboundHandlerAdapter.class:?]
at io.netty.handler.timeout.ReadTimeoutHandler.channelInactive(ReadTimeoutHandler.java:143) [ReadTimeoutHandler.class:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelInactive(DefaultChannelHandlerContext.java:237) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelInactive(DefaultChannelHandlerContext.java:223) [DefaultChannelHandlerContext.class:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:767) [DefaultChannelPipeline.class:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe$5.run(AbstractChannel.java:558) [AbstractChannel$AbstractUnsafe$5.class:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [SingleThreadEventExecutor.class:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:348) [NioEventLoop.class:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
Caused by: java.io.IOException: Packet was larger than I expected, found 34411 bytes extra whilst reading packet 0
at net.minecraft.util.MessageDeserializer.decode(SourceFile:42) ~[ez.class:?]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:232) ~[ByteToMessageDecoder.class:?]
... 16 more

commented

I need more than just the exception stack trace. This tells me nothing about your mod setup/etc

commented

I am running the latest version of the DW20 pack, with ee3 0.3.505, when I filled an achemical bag with to many items with lots of NBT tags, the server could no longer sync my inventory. Using an nbt editor I found the bag had about 12000 nbt tags in total, I deleted one ae2 drive from the bag, which contained exactly 120 tags, and then was able to rejoin the server, as the packet was no longer above max size. I am aware this is my fault, just thought i would let you know this can happen.

commented

A possible solution to this would be for EE3 inventories we could compress NBT tags on items when we save the inventory. This would make opening/closing the inventory slightly slower, but would reduce the total size of the object and avoid this issue.

commented

NBT De-/Serialization might really help out at this, if I may just drop that info :p