GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Server side crash due to newest version of LDLib's if statement (Maybe)

EndsM opened this issue ยท 2 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

1.20.1-1.1.4.a

Recipe Viewer Installed

EMI

Environment

Dedicated Server

Cross-Mod Interaction

Unsure

Other Installed Mods

Jade, Croptopia, advancednetherite, appliedenergistics2, Mekanism, oreexcavation, ferritecore, twilightforest, ad astra, ironchest

Expected Behavior

Open the GUI of the Super Tank

Actual Behavior

The server side meet an exception, then crashed

Steps to Reproduce

  1. I just updated to the 1.1.4a from 1.1.4 of the mod
  2. Then I log to the server, open my Super Tank placed before, which filled with oil and connected to a generator machine
  3. The server side crashed, but client side didn't

Additional Information

crash-log.txt
According to crash log, the crash directly related to LDLib's PlayerInventoryWidget.java file, and is Line 63, which is following script:

if (Editor.INSTANCE != null) {
slotWidget.setCanPutItems(false);
slotWidget.setCanTakeItems(false);
}

It is checking the Editor.INSTANCE properties, but then problem is, the INSTANCE is a "Client side only" property, so while runing on server side, it also checks the property due to its accessibility, this line will run on server, and the property is not on the serverside, so it crashed.

This is my inspection, the change of this checking is introduced in this commit, and it is NOT in previous version used by gtceu-modern, which is 1.0.24.a

I suggest if is really this cause the crash, please roll back to previous version of LDLib, and ask author of LDLib fix this problem.

And if my suspicion is not correct, I hope the log file will help

Thanks for the mod btw

commented

I guess I failed to attach the LDLib's commit in the main part, this is the commit:
Low-Drag-MC/LDLib-MultiLoader@59f2c2a

And this is the said Editor.INSTANCE property:

Environment(EnvType.CLIENT)
public static Editor INSTANCE;
commented

having same issue here and posted on their discord.

crash-2024-03-31_00.03.40-server.txt