Crafting Interface crashes due to null crafting job
Puxta-lab opened this issue ยท 5 comments
Issue type:
- ๐ Bug
Short description:
Hello again. I hope I'm not becoming a nuisance.
I log in to my server today, and suddenly my ID network is inexplicably broken. None of my crafting recipes or items are showing up in my Storage Terminal. My storage does show when I open my Colossal Chest. It was working previously, and I don't know what triggered this faulty behavior. I will try to explain more by relating them to the crash logs.
If you need further context/information or if you need me to do more targeted tests, I'm happy to do so.
Steps to reproduce the problem:
I don't know what caused this faulty state to trigger in the first place, but I will explain how to recreate the crashes now that they're happening.
Crash Log 1: there were some crashes before this, but this is the first I logged. The state of my network is that I had just logged back in after the server crashed from disconnecting my crafting writers and crafting interfaces attatched to crafting tables, alongside my Network Reader. I open my storage terminal, and I notice the items are being read properly by the Storage Terminal again. I place a logic cable to reconnect this part of the network, and that is when the crash happens.
I generate server Profile A after logging back in from Crash Log 1, but before initiating the events that create crash log 2. I would include the crash in the profile, if I knew how, but the link only generates once I stop the profile manually and I can't do that if the server crashes.
Crash Log 2: I log back into my server after crash log 1. Normally, when I crash, the world reverts the actions I did to cause the crash, but not in this case; I log back in, and my network is now connected to the crafting writers and interfaces. I open my storage terminal; all of my items and recipes are gone. I replace some recipes in Interface A that spilled out when I disconnected my interfaces. Those recipes show up in my storage terminal. I take one recipe out of Interface B, and then put it back into the same interface. All of the recipes in Interface B are now showing in the terminal again. I take a recipe out of Interface C; all of the other recipes show in Interface C now. (and it shows the one I pulled out once I put it back in). The crash occurs when I disconnect my interfaces/writers from the network by breaking a cable.
After logging back in from Crash 2, I generate Profile B. Items are once again showing properly in the Storage Terminal. I recall that I have some crafting interfaces elsewhere in my network (not on chests) and the recipes on those are showing properly. I get a hunch that it's not the interfaces causing the crash, but the Network reader.
Crash Log 3: I disconnect my Network Reader from my Crafting Interfaces/Crafting Writers by breaking a cable; neither of these are currently connected to Network 1.
I forgot to stop the profile between generating crash 3 and 4, so I don't have a profile between these crashes.
Crash Log 4: I log back in. I fiddle around a bit with the crafting table interfaces because I don't see the recipes in the Storage Terminal; that's when I remember that's because they're not currently connected to the network. I reconnect my crafting writers/interfaces without reconnecting my network reader, and the game crashes.
Profile C: With the crafting interfaces and writers reconnected, and the network reader still disconnected, I try to open my storage terminal again. Once again, all of my items and recipes are gone.
Crash Log 5: I reconnect the part of my network with the Network Reader on it.
One last one for the road, Crash Log 6: Everything is connected once again, and I cannot see any of the items in the Colossal Chest or access any recipes. I disconnect the Colossal Chest from the network, and the game crashes.
Expected behaviour:
I expected to be able to open my storage terminal to see the items in the chest and access my recipes without a crash.
Versions:
This mod: 1.8.14
IntegratedCrafting: 1.3.2
CyclopsCore: 1.27.1-835 beta
Common Capabilities: 2.10.1
IntegratedDynamics: 1.28.1
IntegratedTerminals: 1.6.17-617 beta
IntegratedTunnels: 1.9.0
Minecraft: 1.21.1
NeoForge: 21.1.211
Modpack: All the Mods 10-4.14
Log file:
Crash Log 1
Profile A
Crash Log 2
Profile B
Crash Log 3
Crash Log 4
Profile C
Crash Log 5
Crash Log 6
I suspect this is unrelated to Colossal Chests.
It seems to be a crafting interface from Integrated Crafting that (somehow) got corrupted.
All crashlogs are exactly the same.
Note to self:
java.lang.NullPointerException: Cannot invoke "org.cyclops.integratedcrafting.api.crafting.CraftingJob.getAmount()" because "craftingJob" is null
at org.cyclops.integratedcrafting.core.CraftingJobHandler.update:L453
at org.cyclops.integratedcrafting.core.part.PartTypeInterfaceCraftingBase.update:L155
at org.cyclops.integratedcrafting.part.PartTypeInterfaceCrafting.update:L136
at org.cyclops.integratedcrafting.part.PartTypeInterfaceCrafting.update:L61
Note to self 2: Might be related to some of the abstractions that were added related to the attuned crafting interface.
I will add, on the note that it might be related to the attuned crafting interface, is that a night or two prior, I had a performance hiccup related to the attuned interface. I can't recall exactly what happened, but what I do recall is that after requesting a craft from the attuned interface, the tickrate slowed to a halt to process an absurdly long tick. The game didn't crash but the tick took something like 30000 ms. I took the attuned interface off of my network after this because I'm already trying to isolate so many other problems and I also didn't like how the attuned interface was taking time loading and crowding my terminals with lots of recipes I would never use.
If there's any profiles you would like me to test in relation to this, I'd be happy to do so.
I will note here, that I managed to "uncorrupt" the crafting interface(s) by breaking them and replacing them. I can access my inventory again and there are no crashes. Though it seems there's a problem when requesting crafts, which I think might have been identified in #160. There was a craft for example where I requested 1000x of an item and it took 200000ms to resolve the tick. This was with a standard interface.
Next time I'm online I'll create a profile related to this. I think this may also be related to the issue in Profile 2A-B in ColossalChest #192. I'm also running the 21 crafters with their logic identified in #160 with only occasional tick spikes to about 2500ms (presumably when they flip true and request a craft) which may suggest the issue is not with the logic at all but with requesting crafts since the performance is much worse running those 3 crafters with no logic.
When I launched my world today to try and collect the profile I said I would; and my world crashed on launch, much like it did when I first made this report. This time, I collected the crash log in case there's any new information for how the interfaces corrupted in the first place. I launched the world a second time after this crash, and the world loads; but I run into the initial problem, of the contents of the inventories and the recipes on the network not showing in the Storage Terminal.
After replacing all of the interfaces and then disconnecting from and reconnecting them to the network, the inventory returns. Once everything is functional, I collect this profile; first, I request 4000 steel dust is turned into 4000 steel ingots by sending them to a crafting interface on a chest which then distributes them to furnaces. This resolves in about 4000ms. Then I request 9000 gold ingots is turned into 1000 gold blocks by sending them to a crafting interface on a crafting table. This results in a 341,000ms tick. Then i stop the profile.