Foam​Fix

Foam​Fix

97M Downloads

Potential memory leak

darthvader45 opened this issue · 3 comments

commented

I was using Foamfix with my mods to increase FPS, and noticed when I pressed F3+T to reload resource packs, the memory suddenly jumped to way more than the 8GB limit I set it to. Not to mention this is what I got in my log: https://paste.ee/p/hg0Yf

I'm running Windows 10 with 16GB of RAM, and before you ask, yes I am using Optifine. Near the end of the log it mentions Foamfix's deduplication stuff, so I'm assuming it has something to do with it. I'm removing Foamfix for now, until something proves that it is not the culprit. Ignore the Bibliocraft stuff that may pop up (it's an error that's been there for quite some time, just can't check for updates apparently).

commented

I can confirm this is an incompatability with Optifine HD_U_E3 and potentially other versions.
Having tested with Optifine enabled and disabled, when switching resource packs or reloading a resource pack, memory usage will double into unusable territory until the game is restarted if Optifine is enabled, and a huge number of deduplication errors will show in the log, also slowing the reloading process by a solid half-minute extra. When Optifine is disabled, there are still a few errors when reloading, and memory usage does APPEAR to grow a bit from what it was before reloading, but remains stable at only 5-10% higher than before, and doesn't continue growing on subsequent reloads.

Since Optifine isn't supported by Foamfix, I know this won't be a priority to fix (if it's even fixable thanks to Optifine's wonderful closed-source stupidity) but it'd be appreciated, since the two together make modded Minecraft actually playable even with Mojang's less-than-stellar optimization.

commented

@darthvader45 turning off Deduplication and IModel deduplication in Foamfix's config appears to be an alternative to removing Optifine. While this will increase RAM usage, it will allow you to still benefit from Foamfix's other improvements while still using Optifine and being able to reload resource packs at will.

commented

Thanks, at least there'll be a workaround for now. Sp614x is a real jerk when it comes to his code. Hopefully if he decides to, there'll be a way to add Optifine compatibility, but that seems a loooong way off, if it ever happens (99% chance of NEVER).