Refined Storage

Refined Storage

77M Downloads

Server crashes when connecting an external storage to an inventory with a lot of items or liquid of one type

Nevrai opened this issue · 4 comments

commented

Describe the bug

The server crashes when putting an external storage on an inventory with an exorbitant number of items or a large amount of liquid. When this happens, you can’t interact with anything, and the game freezes if you leave the world, so you have to restart the game. Upon relogging, it’s rolled back, so it’s impossible to put down the external storage. I’ve tried this three times, and it happened each time.

This happened when putting an external storage on a Sophisticated Storage barrel with about 40 thousand raw iron in it, and it also happened when putting an external storage on a Mekanism dynamic tank with 465,850 buckets of brine in it. This doesn’t happen when using external storage on inventories with fewer items or less liquid. It also doesn’t happen when connecting external storages to Functional Storage drawers with millions of items.

This was in a single-player game.

Screenshots

Screenshots (click to expand)

The barrel I tried putting an external storage on:

barrel

The dynamic tank I tried putting an external storage on:

2022-08-21_04 47 28

My server crashed again when putting a creative edxporter from Cable Tiers onto a Functional Storage controller connected to several drawers with a total of over 17 million items in them. There was also an external storage on this controller. I tried it again after restarting, and it happened again.

My system also won’t export any more raw copper to my drawer when it has 4.6M raw copper in it, even though I have 3.1M more raw copper in my system.

It seems like Refined Storage cannot handle external storage on an inventory with millions of items in one spot, even if it’s a storage drawer. This was in the latest version of RS, 1.10.3, whereas previously, it was in 1.10.2. The same issue occurs in both versions.

Versions

  • Modpack: All the Mods 7 (version 0.4.26 and 0.4.27 [latest])
  • Minecraft: 1.18.2
  • Forge: 40.1.68
  • Refined Storage: 1.10.2 and 1.10.3

How can we reproduce this bug or crash?

  1. Create a Functional Storage drawer or Sophisticated Storage chest or barrel with hundreds of thousands or millions of items in one slot; or create a max size (18×18) Mekanism dynamic tank and fill it up with a liquid. Attach an external storage to this inventory, and the server will crash (even in single-player).

  2. Also try to export items into drawers when there are millions of that type of item in there, and it won’t work and will also crash.

Relevant log output

No relevant log outputs were found. I couldn’t find any Refined Storage errors or warning in the log, nor was a crash report made any of the times I crashed.

commented

Ok. So debugging this is rather difficult. You might be able to run spark sampler then trigger it but I'm not certain.

The way to figure it out for certain would be attaching VisualVM and sharing the result.

Btw for the game there is little to no difference between one and 2 billion of one item. (unless there are problems in the mod RS is interacting with). So the chance that the number of items is relevant is fairly low.

commented

@Darkere Okay, I can do that. Are there any specific arguments I should use with the Spark command?

And I’m not sure how to attach VisualVM. I haven’t done that before.

commented

Maybe use --timeout X to make sure it returns after x settings without you having to trigger it.

For visualvm I wrote a guide at some point. though it isn't great https://gist.github.com/Darkere/3a58d8adfb64738a289c9636544656bc

commented

We need extra info to investigate further.