CyclopsMC / IntegratedTerminals

Terminals for managing and overviewing Integrated Dynamics networks
MIT License
5 stars 6 forks source link

Integrated Terminals "fieldSize is too long" exception #102

Closed flann closed 10 months ago

flann commented 1 year ago

Issue type:


Short description:

Can't access Integrated Terminals storage terminal. "field size is too long" exception in the server logs.

Steps to reproduce the problem:

It seems to be random. If I'm able to access the storage terminal, it doesn't happen while the server is running. Once it happens, the server has to be restarted to make the storage terminals run.

Just today, I saw possibly hundreds of the "field size is too long" exception in the server logs while the client was connecting to the server. This was before I ever attempted to access the storage terminal.

Not sure if this could be in Cyclops core. But it only affects the storage terminal, AFAICT.

  1. ...

Expected behaviour:

I should always be able to access the storage terminal and there should not be any "field size is too long" errors on the server.


Versions:

Log file:

This is a stack trace. I could not find this in the log files: https://pastebin.com/5t2HS62m

rubensworks commented 1 year ago

Thanks for reporting!

flann commented 1 year ago

FWIW, this is in the latest FTB Skies modpack.

rubensworks commented 1 year ago

I'm a bit stumped about this issue. Not really sure what is going on exactly.

I'm suspecting that there's an item in your storage that may have a corrupted or very large NBT tag, which causes the terminal not to open if that item is visible. This would also explain the error showing up when the client is merely connecting to the server.

Some questions that could help solve this problem:

flann commented 1 year ago

Sorry for the delay.

Once the error occurs, yes, it's on all terminals. I have a huge number of items in storage, because I've got integrated dynamics hooked up to a big Create vault and a very large functional storage drawer array, so it'd be extremely tedious to narrow it down.

One new thing I noticed - when the error occurs, it also affects the ability bottle. Although my abilities are still active, they aren't listed in the ability bottle UI. So, it kinda looks like this is an issue in cyclops core, right?

This error is becoming increasingly rare. Couldn't say why. I'm also migrating to refined storage, so I probably won't be able to provide much more info.

flann commented 1 year ago

I should be able to provide a little more info later as I switch to refined storage, because I'm going to disconnect the functional storage controller from the network. Then I'll see if the error still occurs.

rubensworks commented 1 year ago

Although my abilities are still active, they aren't listed in the ability bottle UI. So, it kinda looks like this is an issue in cyclops core, right?

That's really strange. Are you by any chance using some kind of minecraft optimization mod? Those tend to break things...

flann commented 1 year ago

Nope, just an unaltered FTB Skies modpack. I run the server on a separate machine in my house.

One thing I'm noticing: If I start the server and then wait quite a while before connecting the client, the bug is MUCH more likely to occur. I typically don't do this. I usually start the server and client at about the same time,

flann commented 1 year ago

Would it be helpful to have my FTB Skies world? I can still reproduce the issue fairly frequently there.

flann commented 1 year ago

Here's my most recent world backup. Let me know if it's useful. This is for FTB Skies v1.2.1.

https://drive.google.com/file/d/1JCOa4IplwEYCmtbu6JkVa21Sc9CJN0-4/view?usp=sharing

Google Docs
2023-7-21_8-30-0.zip
rubensworks commented 12 months ago

One new thing I noticed - when the error occurs, it also affects the ability bottle. Although my abilities are still active, they aren't listed in the ability bottle UI. So, it kinda looks like this is an issue in cyclops core, right?

Could you share the logs on this?

Everlasting Abilities is only sending a single integer when containers are opened, so I guess field size is not actually going to be the root cause of the problem.

flann commented 11 months ago

Unfortunately, I have not seen the ability bottle bug happen recently. FYI - I started playing All the Mods 8 and saw the "fieldSize is too long" exception happen very early on. The only integrated dynamics stuff I had set up was a storage terminal connected to a Create vault. Note that I was using a Create vault in FTB Skies, too. Again, I didn't see the exception in the logs. It was only in the console. Not sure where to look for the logs where the exception would be. Maybe I'm blind.

flann commented 11 months ago

Here's a full console log from my ATM8 server. Still haven't figured out whether it logs this to a file somewhere. Don't see one with the exception in it.

This is ATM8 v1.0.22. Running on Adoptium JRE 17.0.5+8.

ATM8 console log

If it's helpful, here's a list of mods:

ATM8 Mod List

flann commented 11 months ago

Happened again this morning in ATM8 v1.0.22. Here's all the server logs I can find.

rubensworks commented 11 months ago

The next CyclopsCore release will contain some improved packet error reporting details, for debugging this issue. Once you've updated to that next version, could you share the logs again when the error has occurred?

flann commented 11 months ago

Sure. I'll give it a try with ATM8. Is the logging change in this version release from 4 hours ago?

CyclopsCore-1.19.2-1.18.8.jar

ATM8 is currently using CyclopsCore-1.19.2-1.18.6.jar. I assume 1.18.8 would be compatible with the other integrated dynamics mods? e.g. IntegratedTerminals-1.19.2-1.4.7.jar?

Or will I need to upgrade the related mods, too?

flann commented 11 months ago

I dropped in Cyclops Core v1.18.8, and it seems to work fine with the other mods. Haven't been able to reproduce the issue, yet. I'll keep an eye on it.

rubensworks commented 11 months ago

Sure, only updating CC should be fine.

quikenb commented 11 months ago

Just to add to this as well. We are running ATM9 v0.59 and getting similar issues. CC 1.18.9 ID 1.17 IC 1.1.4 ITer 1.4.1 Itun 1.8.21.

Every time somebody open an integrated storage system we have this log in console io.netty.handler.codec.EncoderException: java.io.EOFException: fieldSize is too long! Length is 28009, but maximum is 26 at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.FriendlyByteBuf.m130081(FriendlyByteBuf.java:619) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.FriendlyByteBuf.m130260(FriendlyByteBuf.java:599) at TRANSFORMER/cyclopscore@1.18.9/org.cyclops.cyclopscore.network.PacketCodec$12.decode(PacketCodec.java:254) at TRANSFORMER/cyclopscore@1.18.9/org.cyclops.cyclopscore.network.PacketCodec.lambda$decode$1(PacketCodec.java:585) at TRANSFORMER/cyclopscore@1.18.9/org.cyclops.cyclopscore.network.PacketCodec.loopCodecFields(PacketCodec.java:562) at TRANSFORMER/cyclopscore@1.18.9/org.cyclops.cyclopscore.network.PacketCodec.decode(PacketCodec.java:584) at TRANSFORMER/cyclopscore@1.18.9/org.cyclops.cyclopscore.network.PacketHandler.lambda$register$2(PacketHandler.java:67) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.simple.IndexedMessageCodec.lambda$tryDecode$0(IndexedMessageCodec.java:107) at java.base/java.util.Optional.map(Optional.java:260) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:107) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:153) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:63) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.NetworkInstance.dispatch(NetworkInstance.java:68) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:80) at java.base/java.util.Optional.map(Optional.java:260) at TRANSFORMER/forge@47.1.3/net.minecraftforge.network.NetworkHooks.onCustomPayload(NetworkHooks.java:80) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.network.ServerGamePacketListenerImpl.m7423(ServerGamePacketListenerImpl.java:1675) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket.m5797(ServerboundCustomPayloadPacket.java:35) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket.m5797(ServerboundCustomPayloadPacket.java:8) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.Connection.m129517(Connection.java:174) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.Connection.channelRead0(Connection.java:159) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.Connection.channelRead0(Connection.java:50) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:444) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:280) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.codec@4.1.82.Final/io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.handler@4.1.82.Final/io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) at MC-BOOTSTRAP/io.netty.transport@4.1.82.Final/io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) at MC-BOOTSTRAP/io.netty.common@4.1.82.Final/io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at MC-BOOTSTRAP/io.netty.common@4.1.82.Final/io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.EOFException: fieldSize is too long! Length is 28009, but maximum is 26 at MC-BOOTSTRAP/io.netty.buffer@4.1.82.Final/io.netty.buffer.ByteBufInputStream.checkAvailable(ByteBufInputStream.java:327) at MC-BOOTSTRAP/io.netty.buffer@4.1.82.Final/io.netty.buffer.ByteBufInputStream.readFully(ByteBufInputStream.java:239) at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:614) at MC-BOOTSTRAP/io.netty.buffer@4.1.82.Final/io.netty.buffer.ByteBufInputStream.readUTF(ByteBufInputStream.java:301) at TRANSFORMER/minecraft@1.20.1/net.minecraft.nbt.NbtIo.m128930(NbtIo.java:149) at TRANSFORMER/minecraft@1.20.1/net.minecraft.nbt.NbtIo.m128934(NbtIo.java:99) at TRANSFORMER/minecraft@1.20.1/net.minecraft.network.FriendlyByteBuf.m130081(FriendlyByteBuf.java:617) ... 70 more

affects all systems on the server, only 3. it happened previously, but I put it down to NBT data when breaking the item interfaces, so by just replacing them with newly crafted ones fixed the issue, but now, I have no fix.

flann commented 10 months ago

I upgraded ATM8 to v1.0.25 and then re-added Cyclops Core v1.18.8. I'm no longer able to reproduce the issue. I will continue to watch it.

rubensworks commented 10 months ago

Thanks for the input. Possible a pack issue then after all.

flann commented 9 months ago

Just had it happen again this morning. Lucky. I was on the verge of switching over to Refined Storage in All the Mods 8. I'm not quite on the latest ATM8 version. I'm on 1.0.27 and the latest is 1.0.28.

Pastebin won't take the debug log file, so I had to get creative. I put the logs in a public repository on GitHub.

GitHub FieldSizeTooLong repository

rubensworks commented 9 months ago

Hmm, it looks like my debug output is not being emitted due to an oversight. Should hopefully tell us more in the next release.