Refined Storage

Refined Storage

115M Downloads

Memory leak with Create Deployers

jf908 opened this issue ยท 3 comments

commented

Describe the bug

Refined Storage blocks inside the same chunk as an active Create deployer will continuously re-initialize themselves. When you break the RS blocks, you will lose the drop and sometimes the game will crash. Leaving it going will cause the game to leak memory until the game crashes.

How can we reproduce this bug or crash?

  1. Install Refined Storage and Create
  2. Place a Creative Controller, an Autocrafter Manager, an Autocrafter, a Create Creative Motor and a Create Deployer with a bucket in its hand.
  3. See how the patterns appear duplicated in the Autocrafter Manager.
Image Image

What Minecraft version is this happening on?

Minecraft 1.21.1

What NeoForge or Fabric version is this happening on?

NeoForge 21.1.109

What Refined Storage version is this happening on?

2.0.0

What modpack and modpack version, if any, are you using?

No response

Relevant log output

commented

Thank you for the good analysis!

commented

Related to #986

commented
Image

It seems like the Create deployer causes the chunk to continuously reload, causing the block entities to refresh every time, calling clearRemoved. Calling clearRemoved initialises the Refined Storage network with the added block entity.

However, the chunk reload is calling clearRemoved, but setRemoved is never called. This way, the network never knows that the chunk got reloaded in the first place and the old block stay in the network.