Memory leak when changing dimensions (client-side)
ViRb3 opened this issue ยท 1 comments
Issue Description:
Memory leaks every time a player changes dimensions. After around 12 hours of gameplay the game's memory is full and you are forced to restart.
Steps to reproduce:
- Using the Compact Machines mod, create a new compact machine
- Start spamming right-click with a Personal Shrinking Device in hand, this will rapidly switch you insde and outside the pocket dimension
- After 10 minutes, the game crashes as it runs out of memory
Technical details:
Using JProfiler, I traced down the problem to WayofTime.bloodmagic.util.handler.event.GenericHandler
. It seems to keep hundreds of references to net.minecraft.client.multiplayer.WorldClient
which it never releases.
Affected Versions (Do not use "latest"):
- BloodMagic: BloodMagic-1.12.2-2.4.3-105.jar
- Minecraft: 1.12.2
- Forge: 14.23.5.2852
I suspect the issue is lack of unloading of entries in the following maps: