Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mkienenb opened this issue Feb 7, 2018 · 3 comments
Labels
Bug Gotta squash 'em all!

Comments

@mkienenb
Copy link
Contributor

mkienenb commented Feb 7, 2018

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
> 
@mkienenb mkienenb added the Bug Gotta squash 'em all! label Feb 7, 2018
@Maescool
Copy link

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

@Maescool
Copy link

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

@Wissi
Copy link

Wissi commented May 3, 2018

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"

@Wissi Wissi closed this as completed May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Gotta squash 'em all!
Projects
None yet
Development

No branches or pull requests

3 participants