Jump to content

[1.8] Error: Needed to grow BufferBuilder buffer -- Is this memory leak?


Recommended Posts

Posted

On another thread I came up with a way to send information about all the possible item stacks back to the server (since only client generally knows all the available valid subtypes). This could be useful for example if you want to give random items to a player.

 

Anyway, the approach is pretty simple. If the server hasn't asked before, it will send a message that requests the information to all clients. The clients then respond with a message containing the IDs, valid meta data values, and any client-side NBT (some mods like Tinker's Construct seem to distinguish subtypes with NBT instead of metadata).

 

The messages seem to work well and are implemented pretty straight-forward using the simple network wrapper. For the server-side messages I use a scheduled task to avoid thread concurrent modification issues.

 

Anyway, the scheme works except it can give the following error:

[Chunk Batcher 0/WARN]: Needed to grow BufferBuilder buffer: Old size 524288 bytes, new size 2621440 bytes.

 

To me that seems like some sort of memory leak. I am reading and writing to buffers, however I don't create any new buffers -- I just operate on the message payload buffers (PacketBuffer) passed into the fromBytes and toBytes methods. So I don't think I should need to release the buffers since I assume the networking stack does it elsewhere.

 

Anyway, I don't know where to look next. Any pointers would be appreciated.

 

Here is the full console log:

 

  Reveal hidden contents

 

 

And you can see my code here. From the console log it seems that the MessageSendItemStackRegistryToServer class seems to be the culprit. https://github.com/jabelar/JadensMod

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

This should be the Tessellator allocating more memory for vertex storage. I am not sure why it happens after the crash though.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Posted

I can tell you that the 'Needed to grow BufferBuilder buffer' does not cause crashes on my system.  Happens all the time, especially in the dev environment.

 

Probably don't get hung up on it as the source of your issue.

Long time Bukkit & Forge Programmer

Happy to try and help

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

  Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

  Your link has been automatically embedded.   Display as a link instead

  Your previous content has been restored.   Clear editor

  You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Create New...

Important Information

By using this site, you agree to our Terms of Use.