Refined Storage

Refined Storage

77M Downloads

[1.2.4] Autocrafting crash

chris54721 opened this issue ยท 20 comments

commented

Issue description:

The server crashed while an autocrafting job was running.

What happens:

The server crashes with the following stacktrace:

java.lang.NullPointerException: Ticking block entity
	at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.CraftingPattern.getOutputs(CraftingPattern.java:203)
	at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingStepCraft.execute(CraftingStepCraft.java:121)
	at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.update(CraftingTask.java:351)
	at com.raoulvdberge.refinedstorage.tile.TileController.func_73660_a(TileController.java:269)
	at net.minecraft.world.World.func_72939_s(World.java:1804)
	at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709)
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
	at java.lang.Thread.run(Thread.java:745)

What you expected to happen:

No crash :P

Steps to reproduce:

I don't know exactly what may have caused this since the autocrafting job had been running for some time already. My guess would be a recipe containing an item which doesn't get used up and there aren't any output slots for it. In this case the job involved IC2 Iron Plates.

Version:

  • Minecraft: 1.10.2
  • Forge: 12.18.2.2151
  • Refined Storage: 1.2.4

I'm using the "All the Mods" modpack.
The issue occured on a server.

If a (crash)log is relevant for this issue, link it here:

http://hastebin.com/ujigakizew

commented

Try 1.2.1 that should fix this

commented

Getting the same crash after updating: http://hastebin.com/gelayumezu

commented

You might have to MCedit away the controller. If that crash was on startup at least.

commented

Same crash happened on latest version (1.2.4). Updated the issue with more details.

commented

@way2muchnoise I think this one is fixed?

commented

Just happened again on latest All the Mods, updated issue accordingly. /cc @raoulvdberge

commented

Dunno, I know what crashes but I have never been able to reproduce it.

commented

Not sure if this is the same issue, crash report looks a bit different. Autocrafting ic2 reactor and all sub-components causes server crash, version 1.2.4 in direwolf20 modpack.

http://hastebin.com/awipaqahem.scala

commented

I turned off use oredict on all patterns and made sure each of them were using ic2 plates and not ie plates, although the Pattern Grid/JEI is always putting in IE plates with the "+" button. The Processing pattern block on the other hand mirrors whatever is in JEI when you hit the button.

Anyway, after making those changes I can autocraft a nuclear reactor without crashing the server. Thought that info might come in handy in figuring out what is going on.

commented

kinda odd that is ic2 related.

commented

I think that might have more to do with more people using autocrafting for lategame IC2 machines using oredict plates than people using autocrafting for earlygame IE machines using oredict plates.

I build all my IE stuff by hand, for example, but IC2 reactors in particular involve a ton of microcrafting so i automate it if possible.

commented

@chris54721 @random51 when it crashed the server, did it display the preview correctly? Also does this still occur on something after 1.2.5 ?

commented

Yes. It showed all the required items and allowed me to start the process. I don't believe it crashed until it tried to make an iron plate or tried to request an iron plate to make the electronic circuit. I narrowed it down to that point by working from the reactor down to each part, crashed all the way down to the electronic circuit. It could craft the parts for the circuit without crashing but try to craft the circuit and it'd would crash.

commented

Same here.

commented

So I guess this can be hunted down to either the pattern being tagged ore dict and taken some plate it shouldn't take. Or Something is going very wrong somewhere. Is there a 100% reproducible scenario?

commented

It is 100% reproducible. Recreated the pattern multiple times. Turning off ore dict helps.

commented

Made it all little robuster with a null check. Should help out. Your craft might have the rescheduler kick in, but that will happen automatically :D

commented

I'm not sure that hiding the exception is the solution actually. Is the ItemStack parameter truely expected to be null in some cases?

commented

Way2muchnoise exposed.

commented

The issue that I guess people abuse the oreDict pattern, maybe I should add some extra enforcing there. We'll see how this goes first. :D