MineColonies

MineColonies

57M Downloads

CRASH: Tried to read NBT tag that was too big; tried to allocate: 2097186bytes where max allowed: 2097152

mkienenb opened this issue ยท 3 comments

commented

Minecolonies version

Unknown. Probably doesn't matter as it affects loading saved games.

On game load, the server shuts down and kicks you back to the launcher:

Error is:

00:41:47    FML Netty Local Client IO #2    error   SimpleChannelHandlerWrapper exception
java.lang.RuntimeException: Tried to read NBT tag that was too big; tried to allocate: 2097186bytes where max allowed: 2097152
    at net.minecraft.nbt.NBTSizeTracker.func_152450_a(NBTSizeTracker.java:25)
[...]
    at net.minecraft.nbt.CompressedStreamTools.func_152456_a(CompressedStreamTools.java:88)
    at net.minecraft.network.PacketBuffer.func_150793_b(PacketBuffer.java:315)
    at net.minecraftforge.fml.common.network.ByteBufUtils.readTag(ByteBufUtils.java:227)
    at com.minecolonies.coremod.colony.ColonyView.handleColonyViewMessage(ColonyView.java:475)
    at com.minecolonies.coremod.colony.ColonyManager.handleColonyViewMessage(ColonyManager.java:991)
    at com.minecolonies.coremod.network.messages.ColonyViewMessage.onMessage(ColonyViewMessage.java:69)
    at com.minecolonies.coremod.network.messages.ColonyViewMessage.onMessage(ColonyViewMessage.java:18)
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:56)

Code is:

```
      public IMessage handleColonyViewMessage(@NotNull final ByteBuf buf, @NotNull final World world, final boolean isNewSubscription)
    {
[...]
      this.requestManager = new StandardRequestManager(this);
        this.requestManager.deserializeNBT(ByteBufUtils.readTag(buf));
        return null;
    }
```

@Raycoms wrote:

> Yeah, we have a few of those timebombs around, basically: A while back we had a bug which created thousand of requests which got basically too big for NBT, so there are a few world with huge colony.dats
> And they probably didn't get the rs reset command yet
> so they have to edit the requests out of the NBT
> 
> We don't have [a] check [for this].
> We should probably add a check to the line this crashes
> and execute the rs reset command there
> to fix up those worlds
> 
commented

Bug present in minecolonies-universal-1.12.2-0.8.7582
Fixed in minecolonies-universal-1.12.2-0.8.7637

commented

I've got the exact same bug, multiplayer in this case, but on client side, on server side no error, just player connecting and disconnecting

commented

Closed as per Maescool reported on Feb 27:
"Bug present in minecolonies-universal-1.12.2-0.8.7582
Fixed in minecolonies-universal-1.12.2-0.8.7637"