Refined Storage crashing world
Addiboi opened this issue · 8 comments
Issue description: Cant join my world anymore. Earlier it just started crashing the game after a few minutes
What happens: World loading error
What you expected to happen: expected the world to load
Steps to reproduce:
- install all the mods 6
- Use RS in the whole base, also some fluid external storages (mekanism multiblock)
...
Version (make sure you are on the latest version before reporting):
- Minecraft: 1.16.3 and 1.16.4
- Forge: 35.0.14, 35.1.25
- Refined Storage: 1.9.8 and 1.9.9
Does this issue occur on a server? [yes/no]
yes, both on my singleplayer world and my server with the same world file
If a (crash)log is relevant for this issue, link it here:
Encountered an unexpected exception
java.lang.NullPointerException
at com.refinedmods.refinedstorage.apiimpl.storage.externalstorage.FluidExternalStorage.insert(FluidExternalStorage.java:87)
at com.refinedmods.refinedstorage.apiimpl.storage.externalstorage.FluidExternalStorage.insert(FluidExternalStorage.java:20)
at com.refinedmods.refinedstorage.apiimpl.network.Network.insertFluid(Network.java:373)
at com.refinedmods.refinedstorage.apiimpl.network.node.ImporterNetworkNode.update(ImporterNetworkNode.java:108)
at com.refinedmods.refinedstorage.apiimpl.network.NetworkListener.onWorldTick(NetworkListener.java:25)
at net.minecraftforge.eventbus.ASMEventHandler_1677_NetworkListener_onWorldTick_WorldTickEvent.invoke(.dynamic)
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297)
at net.minecraftforge.fml.hooks.BasicEventHooks.onPostWorldTick(BasicEventHooks.java:100)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:856)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:786)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78)
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:641)
at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232)
at net.minecraft.server.MinecraftServer$$Lambda$25061/1712236058.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
17:21:13.052
Preparing crash report with UUID a9debb16-a3e6-4520-8ebc-1cdd5ea34195
17:21:35.784
[RandomPatches ServerLoginNetHandler Transformer]: Patching method: func_73660_a (func_73660_a)
2020-11-15 17:21:14,634 Worker-Main-40 WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
17:21:35.787
Process crashed with exit code -1
[pastebin/gist/etc link here]
Hello, just checking if the possible fix was suppose to be pushed or not. By the looks of it, 1.9.11 still uses the old code and the same crash still occurs (crash report).
The proposed fix was not valid.
Any idea about what you might have an external storage in fluid mod on?
Unfortunately, this was not my crash report so I can't give much more information. I'll try and get the user to comment here, or gather the information from them and forward it here.
The user replied, here's what I can tell you so far.
- The user was making an ore processing setup with Mekanism
- From what I can tell, they were not using any storage tanks or anything. They were working with just machines. Mekanism is a common factor in both of these instances. I'm not sure if it would be worth checking if Mekanism is a factor in this bug or not, just though I'd mention it.
- They started importing Sodium into the system on an 'Extra Storage' Fluid Disk
- I can't verify if this was the cause of the crash, or just the last thing they remember doing prior to the crash.
If I get any further information from this user I will pass it along. If you have any further questions I'll try my best to gather it.
Hey there,
I am the one who had the issue 04Slash mentioned.
I will try and describe my setup and the changes i made before it crashed
I had several Mechanism machines and I tried to facilitate the fluid transfer using refined storage.
For example the thermal evaporation plant exported into a quantom tank and i had an external strorage bus attached to the tank.
I then export this into another quantum tank somewhere else into a different Mekanism Machine,
This was working fine. I did this for Brine and the other fluid you get from the thermal plant.
The crash happened when i did this for liquid sodium. The only change here is was importing it into a fluid disk directly into the system.
So Mekanism machine that makes liquid sodium into quantum tank, which had a importer on it.
The strange thing is i remember seeing the liquid sodium in the fluid grid, before i even added the fluid disk to my disk drive
Shortly after i started importing it the game crashed.
I have managed to restore to a backup of the day before. So i will see if i can get some screenshots. If you need any extra info just let me know.
Hey there,
here are some screenshots of the setup before it went kaput
Brine and liquid lihium in quantom tanks with external storage
again same fluids being exported into quantom tanks and transfered into Mekanism machines
I then crafted a fluid disk (was not in use yet, just sitting in inventory)
All of the above was stable and had been like that for a few days
I created liquid sodium which went into quantom tank with an importer into the systeem.
I went to get the fluid disk to put it into the systeem and i noticed that that i could already see the sodium in the fluid grid.
Wierd i though. Then i grabbed the fluid disk I made and put it into the disk drive. and i went baout creating a new location for the reactor. No further changes to machines and such.
Few minutes after that game crashed.
I've gotten this from attaching an External Storage in Fluid mode to a Containment Chalice from Astral Sorcery. No crash, until I left my base. My base is chunkloaded, but the Chalice was outside the radius. So the importer pulling liquid in (and the controller) were chunkloaded, but the external storage and chalice were not. This put the server in a hard crash loop which was rather difficult to fix.
Can FluidExternalStorage just handle nulls? I know it's marked as @nonnull
but the events are coming from an event bus. Other mods are not checking what they would be doing at compile time or including your jars.
I understand I'm proposing a lazy armchair code change of just put a try in there and using an annotation is a much more elegant solution but I don't think there's any way to test, handle or catch all the runtime possibilities? Or am I missing something? Is there just no way to // do nothing
on catch an NPE? I don't even know root cause. If the chunk is loading or missing along a boundary (this seems to be our issue too), inserting air/null/nothing is fine by me from a gameplay standpoint. But, armchair mode here. Sorry. 🌻