GTNewHorizons / GT-New-Horizons-Modpack

A big progressive questing modpack for Minecraft 1.7.10 balanced around the mod GregTech.
https://www.gtnewhorizons.com/
Other
1.02k stars 311 forks source link

Robes of the Stratosphere causes a memory leak #13007

Closed clifward closed 1 year ago

clifward commented 1 year ago

Your GTNH Discord Username

Clifward#1363

Your Pack Version

2.3.0

Your Server

Private Server

Java Version

Java 19

Type of Server

Vanilla Forge

Your Expectation

I should be able to watch a player equipped with the "Robes of the Stratosphere" without having a huge increase in memory consumption.

The Reality

When a player look in the direction of another player equipped with the "Robes of the Stratosphere" , it causes the memory consumption of Java to skyrocket until the OOM.

photo_2023-03-23_11-25-52 (the other player equipped with the robes is hidden behind the aluminium tank wall, and the RAM usage increases)

photo_2023-03-23_11-25-50 (when the other player is not rendered)

Each increase of RAM usage shown in the screenshot happens exactly while rendering the player equipped with the robes.

This behavior has been reproduced with :

Your Proposal

Fix the memory leak.

Final Checklist

El-Basurero commented 1 year ago

I ran into the same issue as well while wearing the robes. I tested on Java 8, 20, and 17 on windows 10. I play on a private server which was fine, but I would get a memory leak client side and crash after about an hour due to running out of RAM.

Let me know if there are any logs or anything I can provide that would be helpful.

Lyfts commented 1 year ago

Can confirm that this memoy leak is present on 2.3.2 aswell. Memory instantly starts spiking when you put on the robe and stops shortly after removing it.

MineCracked commented 1 year ago

Happening on 2.4.0 as well. Java 17,20 same effect. Java 8 unknown. Running mp server. Anytime a player wears it, or is in the presence of another player wearing it, this happens. Confusingly, this only happens to other players. I don't think I have seen the effect personally, just my teammate.

mitchej123 commented 1 year ago

If you could run visualvm memory profiling and figure out what's being leaked that'd be helpful. A heapdump before, and after, and then diffing the two would be useful. #mod-dev would be a good place to chat about this, a few people have done it before.