Refined Storage

Refined Storage

77M Downloads

Exception in thread "RS crafting preview calculation"

KirbyQK opened this issue ยท 18 comments

commented

Issue description:

Seriously bad lag spikes and can't craft a hardened upgrade, or access two of my crafters, one of which contained the pattern for it.

What happens:

I opened up my wireless crafting terminal to make a hardened upgrade for a machine, and also requested a reinforced. I then realised that I wanted another hardened for another machine, and when I clicked on the start button, it just greyed out. This is within ~5-10 seconds After getting really confused and requesting it a couple more times, I closed the wireless crafting terminal and went to check on the crafter and noticed that I was getting extremely bad lag. I went down to my crafters to check on them and right clicking would open some of them, but not two that I tried. I broke a cable and the network controller, still massive lag so I clicked save and quit.

After reloading the world, it looks like the save and quit failed hard as the cable and controller were still in place and I'd never made the requests. As it turns out I was out of nickel, but it never made it that far - my nickel would be in a locked storage drawer if I had any, so it might be related to that.

What you expected to happen:

It to make a hardened upgrade for me!

Steps to reproduce:

  1. Unsure, it worked completely fine up until now (I've crafted dozens of upgrades) and since, hopefully a one-off. I wanted to report this just in case it is something you can easily stop from happening, in case it corrupts someone's world next time.

...

Version (make sure you are on the latest version before reporting):

  • Minecraft: .1.12.2
  • Forge: 8.0.99.99
  • Refined Storage: 1.5.28

Does this issue occur on a server? no

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

Exception in thread "RS crafting preview calculation" [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NullPointerException [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.util.StackListItem.remove(StackListItem.java:44) [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.util.StackListItem.remove(StackListItem.java:17) [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:259) [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:251) [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:108) [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.network.grid.handler.ItemGridHandler.lambda$onCraftingPreviewRequested$0(ItemGridHandler.java:186) [00:21:19] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.Thread.run(Unknown Source) Exception in thread "RS crafting preview calculation" [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NullPointerException [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.util.StackListItem.remove(StackListItem.java:44) [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.util.StackListItem.remove(StackListItem.java:17) [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:259) [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:251) [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:108) [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.network.grid.handler.ItemGridHandler.lambda$onCraftingPreviewRequested$0(ItemGridHandler.java:186) [00:21:22] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.Thread.run(Unknown Source) Exception in thread "RS crafting preview calculation" [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NullPointerException [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.util.StackListItem.remove(StackListItem.java:44) [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.util.StackListItem.remove(StackListItem.java:17) [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:259) [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:251) [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.autocrafting.task.CraftingTask.calculate(CraftingTask.java:108) [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at com.raoulvdberge.refinedstorage.apiimpl.network.grid.handler.ItemGridHandler.lambda$onCraftingPreviewRequested$0(ItemGridHandler.java:186) [00:21:26] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.Thread.run(Unknown Source) Exception in thread "RS crafting preview calculation" [00:21:31] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NullPointerException Exception in thread "RS crafting preview calculation" [00:21:39] [RS crafting preview calculation/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NullPointerException [00:23:11] [Netty Local Client IO #1/INFO] [Astral Sorcery]: [AstralSorcery] Cleaning client cache... [00:23:11] [Netty Local Client IO #1/INFO] [Astral Sorcery]: [AstralSorcery] Cleared cached client data! Disconnected from server. [00:23:11] [Netty Local Client IO #1/INFO] [SimplyJetpacks]: Loading configuration files [00:23:11] [main/INFO] [journeymap]: Mapping halted in G:\Minecraft\FTBFILES\FTBPresentsDirewolf20112\minecraft\journeymap\data\sp\DW20LP\DIM0 [00:23:25] [Forestry Greenhouse/WARN] [forestry]: GREENHOUSE TAKING 1129 ms LONGER THAN NORMAL [00:24:05] [Forestry Greenhouse/WARN] [forestry]: GREENHOUSE TAKING 1127 ms LONGER THAN NORMAL [00:25:16] [Forestry Greenhouse/WARN] [forestry]: GREENHOUSE TAKING 1144 ms LONGER THAN NORMAL [00:26:48] [Forestry Greenhouse/WARN] [forestry]: GREENHOUSE TAKING 1133 ms LONGER THAN NORMAL [00:28:52] [Forestry Greenhouse/WARN] [forestry]: GREENHOUSE TAKING 1111 ms LONGER THAN NORMAL [00:31:14] [Forestry Greenhouse/WARN] [forestry]: GREENHOUSE TAKING 1117 ms LONGER THAN NORMAL

commented

I figured it out, it's because I had a storage drawer attached to my system that was locked, but was empty. Removed the empty drawer and it all started working fine. I then accidentally hooked up a 2x2 drawer and forgot to fill one of the slots, and it happened again, although less catastrophically this time. Nothing in the FTB log so the exact exceptions in the OP must be only occur with regular crafters, as since I had the above issue I set up a reborn storage multiblock crafter.

This also seemed to be eating mod items from my compacting drawers, as they were being emptied before my eyes at one point, even when I detached absolutely everything from the RS system except for the drawer controller and an importer that was bringing in the item. I thought it might be unrelated, but I haven't had a single issue with this since I filled empty drawers/filled empty slots.

commented

OK I've replicated it properly now;

  1. Have an RS network with a storage drawer controller attached via an external storage.
  2. Have an empty compacting drawer attached locked to, say, nickel.
  3. Have another empty drawer locked to NOTHING.
  4. Request a non-processing recipe requiring an item from the compacting drawer.

Random AF and probably a corner case (who besides me would actually attach an empty drawer on purpose? I was mapping out my storage room) but there you go.

commented

Thank you, I will take a look at it later.

commented

OK, so I'm sorry to bombard you but I have ACTUALLY figured out EXACTLY what is causing my problems; I had an exporter set to export sawdust into a compactor and had damage comparison turned off. This was 100% what was eating my items, and could also have caused the above exceptions. I replicated this in creative with the following:

image

I tried to simplify it as much as possible and could get it to replicate this issue with this:

image

This should be really easy for you to test and I'd be keen to hear confirmation that I'm not crazy :P

Important parts are; Sawdust in either a drawer or on a disk, exporting into a chest/compactor with damage turned off.

Some details are that I found that if I put the sawdust on the same drawer controller as the copper it wouldn't do this, so having two drawer controllers with it on each seems to do it. Setting the sawdusts' drawer controller stops this from occurring, but setting the copper to a higher priority doesn't.

commented

Since this is drawer-related, I wonder if this bug I reported to StorageDrawers is relevant at all?

jaquadro/StorageDrawers#616

commented

This seems to be happening on and off on our server.

commented

I haven't had any issues of items moving where they shouldn't, however, I have had the same ghost item issue. Some of my empty drawers, that are locked to an item, will 'lose' their item icon when clicked on, or shift-right-clicked with an empty hand. Removing upgrades, or adding upgrades, or picking it up and placing it back down with a moving wand restores the icon. I assumed that this was just a visual problem and haven't really worried about it.

Given I worked around the issue for this thread and still had the ghost item thing is still present for me, I would say they're unrelated to each other and much more likely to be a drawer issue. This is particularly so as my drawers aren't connected with ducts at all. The above is a drawers/refined storage/maybealsoCOFH interaction problem, but the drawer issue appears to just be a drawers interacting with any other kind of mod pipes issue.

commented

bug

commented

Seems like this now happen very rarely. Instead, #1698 happens. 1698 happens exactly at point where crafting preview thread should crash

commented

@KirbyQK I fail to understand how this setup you described (#1629 (comment)) can cause an autocrafting crash.

Can you also test with the latest Storage Drawers, and report back if it's still an issue? Thank you!

commented

@raoulvdberge Sorry mate I think I had two simultaneous problems that, while unrelated, went away after I fixed the issue I outlined in (#1629 (comment)). I believe the problem in OP was actually caused by forestry and totally not your issue, but (#1629 (comment)) was an interaction between refined storage and storage drawers.

This was where having an exporter's damage option changed from default (which I did unintentionally while tinkering) caused it to export the item I wanted, but then also another very similar item, voiding it in the process

commented

I did some quick thonking, I do have a cobblestone drawer with a void upgrade attached to the system, but it's been full for weeks and we didn't experience any problems until I added that specific autocraft and used it. Honestly not certain if the cobblestone is even being used in the craft, but it's something to try.

commented

This issue has prevented me from playing in my world for around a month now. Is it possible that it could be prioritized seeing as it's been open since mid January?

commented

probably just breaking the network controller would fix it now that I think about it actually

commented

First issue is with Forestry and you can fix it yourself if you can put yourself in creative and deal with the lag for 5 min while you break the crafting monitor and crafter handling the request. Whether or not the Forestry devs fix this at any point is up to them - I'm pretty sure that they've already made aware of it

commented

Nah, this bug affects more than just what this issue is about. My issue was closed as a duplicate of this, it was caused by autocrafting Phyto Gro from Thermal Expansion. In my case, the server doesn't even launch, it just crashes 24/7 so /shrug

commented

Tried making sure that you don't have an empty drawer attached to your storage network?

commented

The storage drawers integration has been removed, so RS interacts with it as a regular inventory now. This bug should be gone.