Corruption on message writing/reading #13370
Replies: 1 comment 1 reply
-
The exception caught is [10:32:27 WARN]: net.minecraft.ReportedException: Loading NBT data
[10:32:27 WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:299)
[10:32:27 WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:238)
[10:32:27 WARN]: at net.minecraft.network.PacketDataSerializer.a(PacketDataSerializer.java:670)
[10:32:27 WARN]: at net.minecraft.network.PacketDataSerializer.p(PacketDataSerializer.java:651)
[10:32:27 WARN]: at org.falcon.dao.EntitySyncMessage.read(EntitySyncMessage.java:61)
[10:32:27 WARN]: at org.falcon.c.MyPublisherHandler.channelRead0(MyPublisherHandler.java:29)
[10:32:27 WARN]: at org.falcon.c.MyPublisherHandler.channelRead0(MyPublisherHandler.java:12)
[10:32:27 WARN]: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
[10:32:27 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
[10:32:27 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
[10:32:27 WARN]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
[10:32:27 WARN]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
[10:32:27 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
[10:32:27 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
[10:32:27 WARN]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
[10:32:27 WARN]: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
[10:32:27 WARN]: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
[10:32:27 WARN]: at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
[10:32:27 WARN]: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
[10:32:27 WARN]: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
[10:32:27 WARN]: at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[10:32:27 WARN]: at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[10:32:27 WARN]: at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
[10:32:27 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[10:32:27 WARN]: Caused by: java.io.EOFException
[10:32:27 WARN]: at java.base/java.io.DataInputStream.readFully(DataInputStream.java:203)
[10:32:27 WARN]: at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:614)
[10:32:27 WARN]: at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:570)
[10:32:27 WARN]: at net.minecraft.nbt.CompoundTag.readNamedTagName(CompoundTag.java:508)
[10:32:27 WARN]: at net.minecraft.nbt.CompoundTag$1.load(CompoundTag.java:44)
[10:32:27 WARN]: at net.minecraft.nbt.CompoundTag$1.b(CompoundTag.java:33)
[10:32:27 WARN]: at net.minecraft.nbt.NbtIo.readUnnamedTag(NbtIo.java:293)
[10:32:27 WARN]: at net.minecraft.nbt.NbtIo.read(NbtIo.java:238)
[10:32:27 WARN]: at net.minecraft.network.FriendlyByteBuf.readNbt(FriendlyByteBuf.java:670)
[10:32:27 WARN]: at net.minecraft.network.FriendlyByteBuf.readNbt(FriendlyByteBuf.java:651)
[10:32:27 WARN]: ... 20 more But the data is being encoded properly, when I apply manual read with the FriendlyByteBuf it works 100% of the time(on the side that sends the data, with a full byte copy <<), I have debugged this, the EntitySyncMessage also works a lot of times too, but from time to time it fails, with that exception. I am suspicious that I am handling the ByteBuf in a wrong way, it is the first time I am using netty for this purpose |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using netty to write a message to another Minecraft server but from time to time the data doesnt seem to be getting sent properly
This is the code I have to send the specific message, my publisher is:
Beta Was this translation helpful? Give feedback.
All reactions