TerraFirmaCraft-The-Final-Frontier / RoughlyEnoughIDs

Fork of JustEnoughIDs. Minecraft 1.13+ chunk format in 1.12.2, removing the block, item, & biome ID limits.
https://www.curseforge.com/minecraft/mc-mods/reid
MIT License
10 stars 11 forks source link

`2.0.8` server disconnect `fieldSize is too long! Length is 28886, but maximum is 67` #37

Closed Krutoy242 closed 5 months ago

Krutoy242 commented 5 months ago

After updating to RoughlyEnoughIDs-2.0.8, when I joining my old world, I get disconnected shortly after chunks are loaded with error:

[Netty Client IO #7/ERROR] [FML]: FMLIndexedMessageCodec exception caught
io.netty.handler.codec.DecoderException: io.netty.handler.codec.EncoderException: java.io.EOFException: fieldSize is too long! Length is 28886, but maximum is 67
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98) ~[MessageToMessageDecoder.class:4.1.9.Final]
[...]
Caused by: io.netty.handler.codec.EncoderException: java.io.EOFException: fieldSize is too long! Length is 28886, but maximum is 67
    at net.minecraft.network.PacketBuffer.readCompoundTag(PacketBuffer.java:319) ~[gy.class:?]
    at net.minecraft.network.PacketBuffer.handler$zob000$readIntItemId(PacketBuffer.java:1445) ~[gy.class:?]
[...]
Caused by: java.io.EOFException: fieldSize is too long! Length is 28886, but maximum is 67
    at io.netty.buffer.ByteBufInputStream.checkAvailable(ByteBufInputStream.java:313) ~[ByteBufInputStream.class:4.1.9.Final]
    at io.netty.buffer.ByteBufInputStream.readFully(ByteBufInputStream.java:233) ~[ByteBufInputStream.class:4.1.9.Final]

debug-2.log.gz

Downgrading back to 2.0.7 fixing the issue.

Exsolutus commented 5 months ago

Does this also occur when loading a new world, or only an old world?

Krutoy242 commented 5 months ago

This is happen on old world and only on specific chunks, where my base located. If i teleport to another place game runs fine. I didn't tested new fresh world.

Exsolutus commented 5 months ago

According to the log the issue is with Iron Chests mod crystal shulker box. I've tested them in a new world in 2.0.8 and they work fine.

This issue is caused by pre-2.0.8 versions not properly supporting extended item IDs (certain edge cases would cause certain items to crash the client). Version 2.0.8 enables proper support for extended item IDs, but this produces a hard incompatibility with pre-2.0.8 versions. We will make this information more visible moving forward.

Krutoy242 commented 5 months ago

According to the log the issue is with Iron Chests mod crystal shulker box

Yes, regular crystal chests not producing error. Its some kind of specific chest probably with specific items inside.

hard incompatibility with pre-2.0.8 versions.

Does this means I cannot update old worlds? This sounds like serious breaking change.
I would like to always keep latest mods versions, but there will always be players who want to update my modpack, playing on their old worlds 😥

Exsolutus commented 5 months ago

Certainly understandable, and I definitely want to find a good solution for this, but options seem limited.

Perhaps you can identify any specific problem items by loading your world with 2.0.7, moving the items from the shulker chest into a vanilla chest, and checking if 2.0.8 still has a problem without the shulker chest.

Krutoy242 commented 5 months ago

This will take time but i could try it.

jchung01 commented 5 months ago

I was able to replicate the crash by enabling the debug for items within REID and inserting one of the items with a large id into a crystal shulker box. Can you try with this build? It's my current build off of some heavy refactoring I'm doing with the mod, so hopefully it doesn't cause other crashes before you can check it. (Make sure to unzip) RoughlyEnoughIDs-2.0.8.jar.zip

Krutoy242 commented 5 months ago

Can you try with this build?

Are you developer of REID? If i will test your version, would it help to fix the issue of main branch?

jchung01 commented 5 months ago

I'm only a contributor, I provided that version because I can replicate the issue in 2.0.8 but using the current build of my refactored version, I was able to load the world again without crashing from the crystal shulker box. I didn't make any changes intentionally to fix this issue, but my refactoring may have fixed it as a side effect.

If you would like, please test with that version and see if the crash persists. I've published my branch here for now just to show what code the build is based off of. I will PR the branch later so it should (hopefully) get merged into main branch.

Krutoy242 commented 5 months ago

I was able to replicate the crash by enabling the debug for items within REID and inserting one of the items with a large id into a crystal shulker box. Can you try with this build? It's my current build off of some heavy refactoring I'm doing with the mod, so hopefully it doesn't cause other crashes before you can check it. (Make sure to unzip) RoughlyEnoughIDs-2.0.8.jar.zip

Yes, I just tested this .jar file and its working fine! This version cannot replicate 0-message issue and world working fine.