[Bug] World crash due to autocrafting with liquids
MACSkeptic opened this issue ยท 6 comments
Ran into exactly this issue when playing sky factory one this week (see related DarkPacks/SkyFactory-One#149):
My setup:
- Crafter with recipe for blaze rod: 0.2 buckets of blazing blood -> blaze rod, pointing at a mob grinding utils singularty tank
- External storage pointing at a mob grinding utils jumbo tank with blazing blood (plenty, dozens of buckets of content)
Request to craft a blaze rod and boom, world crashes.
crash-2021-11-30_21.23.12-server.txt
The only way of loading my world again was to edit the refined storage .dat files and change my controller redstone mode (from ignore to only work on redstone on).
This allowed me to load the world again and I verified that turning the refined storage system on causes a crash.
Later I just removed this blaze rod crafting setup (it was the only change I made) and verified that I could turn my refined storage system back up again with no issues, thus determining the exact culprit.
I think I have reproduction scenario for this one if it helps:
I was using mekanism tank for filling buckets, by accident I have set up pattern as follows:
Input:
2000mb of water, 1 bucket, output 1 water bucket, additionally I have decided to use exporter instead of specyfing water amount, but forgot to remove it. When 64 buckets were requested it did like 10 or so and froze, nothing could be crafted again in that tank (mostly to it being full), when I have placed buckets in manually, it did couple of them and crashed with same error as above.
I'm seeing the same thing. now my world won't load :(
Please remember that throwing IllegalStateException
just because some unexpected condition occurs may work well when debugging your mod, but rendering the players' worlds unloadable is probably the worst thing you can do.
java.lang.IllegalStateException: Bad!
at com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.node.NodeRequirements.getSingleFluidRequirementSet(NodeRequirements.java:140)
at com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.node.ProcessingNode.update(ProcessingNode.java:123)
at com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.CraftingTask.update(CraftingTask.java:191)
at com.refinedmods.refinedstorage.apiimpl.autocrafting.CraftingManager.updateTasks(CraftingManager.java:170)
at com.refinedmods.refinedstorage.apiimpl.autocrafting.CraftingManager.update(CraftingManager.java:134)
at com.refinedmods.refinedstorage.apiimpl.network.Network.update(Network.java:165)
at com.refinedmods.refinedstorage.apiimpl.network.NetworkListener.onWorldTick(NetworkListener.java:17)
at net.minecraftforge.eventbus.ASMEventHandler_1082_NetworkListener_onWorldTick_WorldTickEvent.invoke(.dynamic)
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
at net.minecraftforge.fml.hooks.BasicEventHooks.onPostWorldTick(BasicEventHooks.java:100)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:857)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78)
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642)
at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232)
at java.lang.Thread.run(Thread.java:748)
@Spongman there is a way to restore your world I had same problem edit file saves//data/refinedstorage_networks.dat in NBT editor. Change redstone mode of your network to something else (1/2 depending to what you had in your case)
It will make sure your controller will fire a network only on redstone, remove pattern causing crash (if you can recall what you did before crash)
Ok, this is pretty frustrating. I re-built the mod with those exceptions commented out and my world loads just fine, and it seems to work fine, too.
So, as far as I can tell those exceptions serve a single purpose: to make a player's world unloadable.