mojira.dev
MC-270226

(RAM LEAK) Garbage Collector All Java Version Broke

The Java Garbage Collector GC no longer works a recent windows 10 update broke it. Minecraft Uses unlimited amount of ram no matter how much you give it and continues until your computer is out of ram.

steps to reproduce

  • Launch world all default settings

  • Open Task manager and not notice anything too ram yet

  • Open to Lan

  • Close World

  • Open World

  • Open to Lan

  • Look at task manager the GC(Garbage Collector) didn't work

  • Repeat Process 10x and watch it go to 3-5GB

  • If that isn't enough to do it sprint fly around in full screen for 30 minuets

  • If your on an Intel System or NVIDIA it may take longer to reproduce but it still does happen. AMD is the quickest way to get High and Fast Ram Leaks.

According to legacy launcher developers this issue is caused by the GlobalRenderer display list having millions of entries and never clearing. The memory is inside of the DLL's (NATIVES) memory and doesn't show up in game's F3 mode as it's not in java's memory and it started happening around 2022-2023

This bug doesn't effect just the current minecraft version but all minecraft java versions. It's actually a bug from windows that makes java's Garbage collector not work anymore. Manually calling the garbage collector with a mod the game freezes as expected but the ram still stays the same in task manager.

It appears to be less in the latest release but still occurs I was able to reproduce latest release of minecraft with +1.7GB of ram more then java allocated and it stayed there. In older java or minecraft versions it was worse and would continue until your computer went out of memory

Effected Java (Oracle & OpenJDK) versions On Windows 10

  • Java 8u51 (bundled with the launcher itself for mc versions <= 1.12.2)

  • Java 8*

  • Java 7*

  • Java 6 (64 bit) *

  • Java 17* (bundled with the launcher itself on latest release)

Effected Minecraft Versions

  • Minecraft * Releases

Was This ever fixed in the past?:

  • The only time this bug doesn't effect the game is if you are 1.12.2 and you went to the main menu (not fixed for in game) or you were on windows 7 with java 6, 7, or 8 and you were playing <= MC 1.12.2. If you are on MC 1.20.4 going to the main menu doesn't clear the ram leak nor does the in game garbage collector clear it

Linked issues

Attachments

Comments

Arisa Bot

⚠️ Please do not mark Unreleased Versions as affected. You don't have access to them yet.

-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

[MOD] Greymagic27

Thank you for your report!
We're tracking this issue in MC-270127, 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

migrated

This is not a duplicate of MC-270127 that deals with CPU USAGE and this is RAM

[MOD] Greymagic27

Ah I misread that. I noticed the CPU usage in the screenshot as well so thought it matched up. I've reopened this report.

BugTracker

Please don't create another report for the same bug, there is no need for MC-270228

migrated

I have updated the bug report to reflect my findings after 24hrs of testing different versions and windows combinations. Windows 7 with java 6-8 has it fixed or if it does occur it's 1MB per hour I seen the in game memory cleaner take care of the extra ram from the resource manager "Task Manager --> Resource Monitor Windows 7 stuffs" I also seen it was fixed for 1.12.2 if you went to the menu 9/10 times. Occasionally it wouldn't clear. I also added more screenshots proving it also effects older versions that simply use to just work. I believe a feature the GC uses broke after a windows 10 update

[MOD] Greymagic27

We do not have enough information to find the cause of this issue.

Please record a video of this happening and attach it to this report.
If you are on Windows, you can use Windows+Alt+R to open a built-in app for recording game footage.
If you are on Mac (Mojave or later), you can use Shift+Command+5 to open a built-in app for recording your screen.
In case you don't have a program to record videos, we recommend using the free recording software OBS.
In case the resulting video file is too large to be uploaded to the bug tracker directly, please upload it elsewhere (e.g. as unlisted video on YouTube) and link to it here.

Please also attach the full launcher log found in [minecraft/launcher_log.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/].

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

[MOD] Greymagic27

Please also see if this is an issue in the latest snapshot. It uses Java 21 now so GC may be improved

migrated

It appears to be partially fixed in the latest snapshot. It's also not 100% fixed in the latest snapshot. I can reproduce 1.2GB of Natives memory before it starts clearing. Also going into the main menu doesn't seem to clear the natives memory it stays on whatever it was in game.

that being said I think they should fix the underlying issue from windows side on what broke everything. Because why let windows update break compatibility with all minecraft releases even released this year? I reported it here so microsoft would realize whatever they did broke minecraft & java.

[MOD] Greymagic27

If windows broke this please report it directly to Microsoft.
Minecraft may use Java but is not responsible for maintaining the functions of Java itself.

This may also be an issue on your side if it only occured after an update. I could still not reproduce this behaviour. It may be worth speaking to community support and seeing if they can help at all.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

migrated

Still applicable to minecraft so keep it open.

[MOD] Greymagic27

It's applicable to Minecraft, yes. However, it's not a bug within the game; it's a bug within windows if an update broke it and it needs to be addressed there.

Fireswamped

@Greymagic27 this is not windows dependent ANY computer will eventually run into this issue if using G1GC. I would recommend reopening this and then merging most of the performance category issues that still use G1GC or JDK less then 22.

migrated

(Unassigned)

Unconfirmed

Performance

1.20.4, 24w13a

Retrieved