You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Which Minecraft version are you using?
1.21
Which version of PneumaticCraft: Repressurized are you using?
8.0.3
Crash log
No response
The text was updated successfully, but these errors were encountered:
Ensure event listener is correctly cleared down when entity is removed
Also, now only registering the semiblock listener if the drone has
a Logistics progwidget (otherwise drone simply doesn't care)
#1336
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
pnc-repressurized/src/main/java/me/desht/pneumaticcraft/common/entity/drone/DroneEntity.java
Line 573 in a010f97
But trying to unregister via object (not only those cases, look for more)
pnc-repressurized/src/main/java/me/desht/pneumaticcraft/common/entity/drone/AmadroneEntity.java
Line 202 in a010f97
pnc-repressurized/src/main/java/me/desht/pneumaticcraft/common/entity/drone/DroneEntity.java
Line 984 in a010f97
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
Which Minecraft version are you using?
1.21
Which version of PneumaticCraft: Repressurized are you using?
8.0.3
Crash log
No response
The text was updated successfully, but these errors were encountered: