mezz / JustEnoughItems

Item and Recipe viewing mod for Minecraft
https://www.curseforge.com/minecraft/mc-mods/jei
MIT License
790 stars 305 forks source link

[Performance]: Memory Leak of Client Player #3794

Closed pietro-lopes closed 1 month ago

pietro-lopes commented 1 month ago

Steps to Reproduce the Bug

https://github.com/mezz/JustEnoughItems/blob/bc0098ddc81e8fe669313a13d17832990c90945c/Gui/src/main/java/mezz/jei/gui/recipes/RecipeGuiLogic.java#L44

  1. Load a world
  2. Open Jei
  3. Change dimensions

image

Expected Behavior

Cached objects that contain ClientPlayer should have a cleanup/update logic as ClientPlayer is discarded on Clone (dimension travel and death for example)

Actual Behavior

Leaks Client Player, Level, everything related to player.

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

No response

latest.log

check image

mezz commented 1 month ago

Thanks for the report! I have fixed the issue by avoiding storing the client player at all, and it will be released shortly.