mojira.dev
MC-264906

Exploring chunks will cause memory leak

EDIT: Make sure to update your java version, I had an older version for java 17, it greatly helps
SIDE NOTE: MINECRAFT STILL USES MORE MEMORY THEN ALLOCATED, BUT I NO LONGER HAVE MEMORY LEAKS.
Also, apologies to the staff, I did not intend to reopen this report, apologies

Bug: Not sure about any other OS, but on arch linux, memory usage is going past the allocated amount and rendered chunks aren't unloaded from memory leading to minecraft consuming all your memory if you load enough chunks.

Steps to reproduce: Im on arch linux, don't know if this will work for other OS. Load any world and start loading/rendering chunks that haven't been loaded onto the memory. (e.g flying in a straight line). The chunks have to be rendered in order to recreate it.

Observed Result: Memory usage starts to go up past the allocated memory and chunks aren't unloaded from memory.

Expected Result: Memory won't go over the allocated limit and chunks should be unloaded from memory when not rendered.
Β 

Linked issues

Attachments

Comments 7

Does MC-166005 describe your issue?

This is not the same issue, MC-166005 states that crossing chunk borders cause stutter, my issue states that there is a memory leak where chunks that are out of your render distance aren't removed from the memory, and would even consume over the RAM limit, say I put a limit of 4GB for minecraft to use, it will proceed to use 20+ if I load enough chunks. All of this is only on client side, I haven't experienced anything on the server I'm hosting on another computer (has arch linux like my main computer)

I've uploaded 2 screenshots for people to see that even though 4GB was allocated, it's consuming 7.7GB and I haven't moved that far from spawn with my render distance set to max. This is on a vanilla instance, no forge or fabric.
The second Screenshot is me travelling 1800 blocks and now 9.1GB is being consumed.

Hi, I have already put some structure into your ticket, but there is still a lot of (unnecessary) information. Please concentrate on the most important things (the bug, steps to reproduce, observed result, expected result).

Everything else, e.g. any mention of mods, is uninteresting. Keep your ticket short following the principle "as little as possible, as much as necessary". This ticket will automatically reopen when you edit the description. πŸ™‚ For more information please read theΒ Bug Tracker Guidelines.

Does MC-173001 describe your issue?

Not 100% sure, but I'll say it sounds like it.

Thank you for your report!
We're tracking this issue in MC-173001, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
πŸ““ Bug Tracker Guidelines – πŸ’¬ Community Support – πŸ“§ Mojang Support (Technical Issues) – πŸ“§ Microsoft Support (Account Issues)
πŸ““ Project Summary – ✍️ Feedback and Suggestions – πŸ“– Game Wiki

MysticAstrol

(Unassigned)

Unconfirmed

Performance

Memory-usage, memory-allocation, memory-leak

1.20.1, 1.20.2

Retrieved