Crash when using mechanical press in 1.20, create 0.5.1.f
Wyrmlet opened this issue ยท 6 comments
When making things on a mechanical press in a modpack, I have encountered numerous server crashes when the item was created. After some troubleshooting in TerraFirmaGreg-Team/Modpack-Modern#202, it appears that the problem is related to this mod.
Server crash log:
crash-2024-01-19_18.45.01-server.txt
After looking into it, it seems to me that the issue is caused by this line:
As it does not check if a player holds an item or not and tries to write something to it, causing a null pointer exception. I suggest adding a check for that, which should be rather straightforward.
I ran into the same problem on my own server. The error is the same as that posted by Wyrmlet. After research, in my opinion, since the code has been executed to Line 147, then the heldItem is not null when the null check part mentioned by VoidLeech is executed. (Translate from Google)
Gah, the github feature to mention a line of code in a new issue bypassed the issue templates. Hopefully that's not a problem.
The null check happens at
Between there and the point of your NPE, none of the code sets heldItem to null without returning out of the function. Fairly confident this is not an issue with Create. You could try a binary search to find the conflicting mod.
I noticed open parties and claims in the mixins. Chunk claiming mods can be quite aggressive in what they allow to happen to a chunk, which could be undoing an assumption that Create's code is based on. Is this happening in a claimed chunk per chance and if so can you reproduce in an unclaimed chunk and/or without a chunk claiming mod installed?
Huh, it did happen in a claimed chunk. Could be worth it to test that, though that could be problematic since the crash doesn't seem to have a clear trigger, instead only happening... Sometimes. Still, thanks for the help.
Yeah most likely a issue with another mod/a mod mixining into create and failing to do a null check