refinedstorage icon indicating copy to clipboard operation
refinedstorage copied to clipboard

External Storage disconnects upon save and reload

Open changhe3 opened this issue 1 year ago • 15 comments

Describe the bug

Buuz135/FunctionalStorage#203

As it has been reported here, basically each time I reload, the FS drawers become disconnected and I have to break and reconnect the cable (which has a be a cable within the chunk as the controller after some testing it seems). I'm pretty sure it's not a chunk loading issue either as I have chunkloaded all near by chunks.

Edit: Upon further testing, this happens to every kinds of storage when used with external storage, not just the storage drawers.

How can we reproduce this bug or crash?

  1. Connect the FS drawer controller to RS with external storage
  2. Save and Reload

What Minecraft version is this happening on?

Minecraft 1.20.1

What Forge version is this happening on?

NeoForge 47.1.79

What Refined Storage version is this happening on?

1.12.3

Relevant log output

no log

changhe3 avatar Oct 21 '23 04:10 changhe3

This sounds an awful lot like this issue cropping up again: https://github.com/refinedmods/refinedstorage/issues/2636

Wishbone1977 avatar Oct 21 '23 20:10 Wishbone1977

Can confirm this is happening to me as well in the Direwolf 1.20 pack. Super annoying. I ended up making a controller extension to keep it in the same chunk as the controller, but now all my crafters in other chunks need to be reconnected after every reload.

Skilles avatar Nov 02 '23 17:11 Skilles

Thanks for the info guys. I cannot reproduce this myself. I will need your help to solve this.

How can you help?

  • Can you create a test world with a minimal set of mods (maybe even just Refined Storage) that reproduces this issue?
  • How far is the External Storage from the Refined Storage Controller?
  • What is the chunkloading situation?
  • Are there reproduction steps that work 100% of the time?

raoulvdberge avatar Nov 05 '23 17:11 raoulvdberge

Thanks for the info guys. I cannot reproduce this myself. I will need your help to solve this.

How can you help?

  • Can you create a test world with a minimal set of mods (maybe even just Refined Storage) that reproduces this issue?
  • How far is the External Storage from the Refined Storage Controller?
  • What is the chunkloading situation?
  • Are there reproduction steps that work 100% of the time?

If you want I can replace all my AE2 stuff in my Techopolis 2 world with RS stuff. Thats where I had the issue personally.

LeSwede avatar Nov 05 '23 20:11 LeSwede

Preferably we get a minimal reproduction testcase. So with the least amount of mods required.

raoulvdberge avatar Nov 05 '23 20:11 raoulvdberge

I'll see what I can do with just RS and drawers

LeSwede avatar Nov 05 '23 21:11 LeSwede

Preferably we get a minimal reproduction testcase. So with the least amount of mods required.

I've made an MC 1.20.1 installation with only Refined Storage, Storage Drawers, JEI and More Overlays (for easier experimentation with chunk boundaries). I'll fool around with it tomorrow to see if I can replicate the issue.

Wishbone1977 avatar Nov 05 '23 23:11 Wishbone1977

Thanks guys!

raoulvdberge avatar Nov 05 '23 23:11 raoulvdberge

I haven't managed to reproduce the issue. I've tried various setups, primarily focused around chunk borders (since that is how the issue originally materialized for me). Given the number of potential variables involved, I don't really know what else to try. I did use a creative controller since I had no powergen mods available, but I wouldn't expect that to make any difference.

The only hypothesis I can come up with is some sort of potential race condition, brought on by a large amount of activity on world load. This might explain why the issue pops up occasionally in full modpack worlds, but is impossible to replicate in small test setups. If that is the case, then while it may not be related to any other specific mod, it might still require the presence of many more mods, as well as more infrastructure using those mods in order to provoke the issue.

But that is purely guesswork on my part. I don't have any idea if that is actually feasible or not.

Wishbone1977 avatar Nov 08 '23 16:11 Wishbone1977

I haven't managed to reproduce the issue. I've tried various setups, primarily focused around chunk borders (since that is how the issue originally materialized for me). Given the number of potential variables involved, I don't really know what else to try. I did use a creative controller since I had no powergen mods available, but I wouldn't expect that to make any difference.

The only hypothesis I can come up with is some sort of potential race condition, brought on by a large amount of activity on world load. This might explain why the issue pops up occasionally in full modpack worlds, but is impossible to replicate in small test setups. If that is the case, then while it may not be related to any other specific mod, it might still require the presence of many more mods, as well as more infrastructure using those mods in order to provoke the issue.

But that is purely guesswork on my part. I don't have any idea if that is actually feasible or not.

For what it's worth, I had this happen with a pretty minimal base (drawers + refined storage). I'm going to try disabling things like multi-threaded chunk loading first and then removing mods one at a time.

Skilles avatar Nov 13 '23 14:11 Skilles

For what it's worth, I had this happen with a pretty minimal base (drawers + refined storage). I'm going to try disabling things like multi-threaded chunk loading first and then removing mods one at a time.

I do have a world which has the problem, but it's not much use in this situation since it's a much older version, from before the changes made in #2636.

Wishbone1977 avatar Nov 15 '23 16:11 Wishbone1977

Just started a playthrough in another modpack (ATM 9) and ran into the same exact bug again (though it didn't happen when I first built my system + drawers). If it's this easily reproducible in large modpacks than I assume there is a mod conflict happening. I have my suspicion on FTB chunks since the only thing I can think of that started causing it to happen was unclaiming & claiming the chunks that the controller and/or external storage was in.

Skilles avatar Nov 16 '23 00:11 Skilles

Just started a playthrough in another modpack (ATM 9) and ran into the same exact bug again (though it didn't happen when I first built my system + drawers). If it's this easily reproducible in large modpacks than I assume there is a mod conflict happening. I have my suspicion on FTB chunks since the only thing I can think of that started causing it to happen was unclaiming & claiming the chunks that the controller and/or external storage was in.

If this is indeed still the same problem as #2636, then I ruled that out at that time. I uninstalled FTB utilities entirely and the problem still persisted.

Wishbone1977 avatar Nov 16 '23 16:11 Wishbone1977

I'm running a custom pack on 1.20.1 and have this same issue. Seems to be a repeat of #2636. Current easiest fix enabling redstone controller on the Controller and then placing a lever beside it. When I join the world no external storage on a diamond chest shows, but no external storage connected to storage drawers shows until the controller is reset. Toggling the controller on and off using the lever restores connections. (Just reading some old threads on this issue) The External connector to the chest is on the same chunk as the controller, the external connectors on the drawer controllers are not.

BonaireDreams avatar Jan 18 '24 21:01 BonaireDreams