PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Memory Leak of MinecraftServer

pietro-lopes opened this issue ยท 1 comments

commented

Describe the bug

This memory leak is caused by not unregistering the DroneEntity from event SemiblockEvent when entity leave the level.

How to reproduce the bug

Join a world, summon any drone, leave world, join again and server is leaked in memory.

Expected behavior

Should unregister by storing a local variable holding the consumer, registering via consumer and unregistering via object does NOT match and fails to unregister.

Registering via Consumer

NeoForge.EVENT_BUS.addListener(this::onSemiblockEvent);

But trying to unregister via object (not only those cases, look for more)


Also trying to unregister on die might not include when single players leave world.
You might want to override onRemovedFromLevel or whatever you choose is the best for your case.

Additional details

image

Which Minecraft version are you using?

1.21

Which version of PneumaticCraft: Repressurized are you using?

8.0.3

Crash log

No response

commented

Fixed in 8.1.1