Skip to content

Potential Memory Leak in "codechicken.nei.guihook.GuiContainerManager.lambda$drawItem$0()" #823

@Stereo528

Description

@Stereo528

Your GTNH Discord Username

studio528

Mod Version

2.8.43-GTNH

Bug Report

Spark Profile: Google Drive (can't upload directly to GitHub, spark profiler was not able to upload to a perma link)
Note: Tested in creative for spark profile, however issue occurs on both Creative and Survival, and on both Singleplayer and Multiplayer (since NEI is Client side). This profile was gathered mostly by sitting in the inventory doing nothing, occasionally scrolling all uncollapsed pages.

I ran a different profile where I opened the inventory, uncollapsed all items, scrolled through all pages, then sat letting the profiler run for a few minutes, before opening the GUI and scrolling through all pages again.
I did not notice a decrease in memory usage from NEI, but there was also no increase until I opened the GUI again. This test was to see if there was some "background" leak from NEI, or if it would resolve itself by not opening the GUI (riveting gameplay for a modpack all out about being in a crafting GUI). The overall Spark Tree was similar to the one linked.

Java Version 25.0.1 OpenJDK
Note: Experienced this leak on 21.0.7 OpenJDK & 21.0.9 OpenJDK as well

Extra JVM Flags: -XX:+UseCompactObjectHeaders -XX:+UseZGC (When testing ZGC)

G1 Garbage Collector & ZGC both tested: ZGC seemed to handle it better/leak slower? (Unsure but seems to be the case)

Must clear "orphaned" memory after game is closed/gets oom-killed via:
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'

P.S. I also noticed a similar type of leak with BetterQuesting and drawing items/blocks to the quest icons, there is a chance both issues are related, but I will still upload that Spark Profile to the BetterQuestion (GTNH) Issue Tracker BQ GTNH does not have an issues page, Where should I upload?

Java Version

Other (Please Specify)

Mod List or GTNH Pack Version

GTNH Pack Version 2.8.3
Railcraft 9.17.10
Gadomancy 1.5.6
Hodgepodge 2.7.27
NEI 2.8.43-GTNH

Mod updates were in attempt to fix said memory leak, as said mods have had memory leak fixes/optimizations

Final Checklist

  • I have searched the issues and haven't found a similar issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions