Applied Energistics 2

Applied Energistics 2

156M Downloads

Crash and corrupted world

yu-re-ka opened this issue ยท 8 comments

commented

Describe the bug

I was clicking around in the crafting terminal, when the server crashed

How to reproduce the bug

I'm not sure

Expected behavior

I can share the world save in private, just message me for that

Additional details

Version 10.0.0-alpha.3

After restarting the server it continues crashing with a different message: https://termbin.com/df3f

Which minecraft version are you using?

1.18

On which mod loaders does it happen?

Fabric

Crash log

https://termbin.com/y660

commented

This seems to fix the second crash (after restarting the server):

diff --git a/src/main/java/appeng/crafting/pattern/AECraftingPattern.java b/src/main/java/appeng/crafting/pattern/AECraftingPattern.java
index 0236f8bb0..1d869dcac 100644
--- a/src/main/java/appeng/crafting/pattern/AECraftingPattern.java
+++ b/src/main/java/appeng/crafting/pattern/AECraftingPattern.java
@@ -240,6 +240,9 @@ public boolean isItemValid(int slot, AEItemKey key, Level level) {
         if (result != null) {
             return result;
         }
+        if (key == null) {
+            return false;
+        }
 
         // Fill frame and check result
         var previousStack = testFrame.removeItemNoUpdate(slot);
commented

The initial crash seems to be related to substitutions in crafting patterns

commented

Oooh, my bad. Bad reading comprehension on my end ;-)
I just looked at the startup crash stacktrace.

commented

The initial crash is not fixed. Please re-open.

commented

I now know how to reproduce the issue. I will try to write a test case that reproduces the crash.

commented

I am working on setting up a test bench for autocrafting too to repro this faster in the future

commented

@yu-re-ka This time, it should actually be fixed. I was able to repro this by crafting pistons. When the actual craft happened to use some acacia planks and some oak planks, this crash occured.

I've also fixed some display issues in the crafting confirm dialog when items were missing. I just noticed that alongside this issue and fixed it.

commented

Thanks!