BedrockIfy - Bedrock Features on Java!

BedrockIfy - Bedrock Features on Java!

462k Downloads

BedrockIfy 1.6 crashes the game if the mixin `client.features.fishingBobber` is enabled and MemoryLeakFix is loaded

Iristallite opened this issue · 2 comments

commented

I've noticed that, if BedrockIfy v1.6 and MemoryLeakFix are loaded together in 1.19.3 (Fabric), the game crashes.
Looking at the log, this seems to be a memory leak caused by the new 3D fishing hooks feature?
I've tested with and without most of my other installed mods, and the crash only happens if MemoryLeakFix and BedrockIfy are loaded together.
Not sure if this is on MemoryLeakFix or BedrockIfy, but disabling the mixin client.features.fishingBobber does fix the crash, so...

Game log (client.features.fishingBobber enabled; game crashed)

commented

Can confirm, it seems to be caused by MemoryLeakFix.

I was going to add a static and final modifier for a member variable that are unique and use the model around in mixin class, but this mod initialize the all of mixin class before executing BedrockifyClient#onInitializeClient. Of course before calling EntityModelLayerRegistry#registerModelLayer, and there is no model layer, thus causing that crash.
edit: I noticed this is not the case when I looked at the log. Apparently my singleton design was considered a memory leak.

Now removed the static modifier from the model and my instance launched normally including both mods. I will create a new PR for this fix.

// Why does my feature always cause problems...? Sorry Juan Carlos :(

commented

// Why does my feature always cause problems...? Sorry Juan Carlos :(
Haha Don't worry! Thank you for the quick fix :)