Immersive Engineering

Immersive Engineering

134M Downloads

[1.14.4] Conveyors Cause Server Crash When an Item Touches Them

Penguin-Spy opened this issue ยท 7 comments

commented

NOTE: I have not done extensive testing because the issue only occurs on a dedicated server, and it's a pain in the butt and slow to restart the server every crash. I have tested most conveyor types.
NOTE 2: I have experience with java coding, and I understand the basics of how minecraft runs, but I have no experience with modding minecraft, so forgive me if I say complete nonsense or don't understand what code does what.

Description of the issue:

When any item touches the "moving" surface of any conveyor, the server crashes pretty much instantly, maybe a delay of a few ticks. When touching any other surface, such as the scaffolding of a covered conveyor, or the back/top of a vertical conveyor, the server does not crash. Other entities, such as a player or a skeleton, do not cause a crash on contact. I have looked around for any similar crash reports/issues, and I found (Issue #3549 ), however that issue was fixed in 12.91. I took a quick glance at the code and onEntityCollision(), which is in the BasicConveyor definition (hence the crash for every type), calls the setPickupDelay() of the ItemEntity. In the Commit d24cd93, you mentioned that getAge() is client side only, and that may be the cause of the server crashing, but I do not know what the definition of the setPickupDelay() function is.

Screenshots

Throwing item:
before crash
Next frame:
after crash
Does not crash when thrown against the back of a vertical conveyor:
no crash on back of vertical conveyor
Or when dropped on top of a covered conveyor:
or on the top of covered conveyors
Other entities are fine on conveyors (because the code changes the age of only items):
skeleton on conveyor
(The server crashed after I took this screenshot because the skeleton dropped some items, and they landed on the conveyor belt).

Crashlog:

This is the server log: server_side.log
The client did not produce any output relevant to the closure, but here it is just in case: client_side.log

Versions & Modlist

Minecraft version: 1.14.4
IE version: 0.14-94
Forge version: 28.2.3
No other mods were installed.

This is my first issue report on GitHub, so I hope I formatted it correctly, and I hope the info I gave helps with fixing the issue!

EDIT 1: The crashlog links were not formatted properly.

commented

Wow, this is probably the most descriptive and detailed crash report I've seen in months.

It's a shame it's a duplicate of #3733 which was reported only an hour before =P

I'll keep this one open because it's far more detailed and close the other one.

commented

This is the same issue that we dealt with previously, see this commit:
bdd5450#diff-f53c54628d98ca5d787fb1c082f7b028

getAge is client only (for no fuckin' reason whatsoever). The only legitimate fix is to replace that construct with a method that sets the item's despawn timer to 10 minutes. I don't super like that though, because it encourages more items floating around.

@malte0811 how bad do you reckon it is if I use writeAdditional to get the Item's NBT and read the age off of that? Alternatively, we could just access-transform the field to make it not private...

commented

I'd go with an AT, but NBT is probably also fine here.

(for no fuckin' reason whatsoever)

As I understand it everything that isn't used on the server automatically becomes @OnlyIn(DIst.CLIENT), I'm not sure whether that is "no fuckin' reason" for you.

commented

That's a weird way to handle it tbh? I'd expect OnlyIn to be tacked onto things that are volatile on servers. Things like rendering, which need to be excluded because those packages are missing on the server. age is used actively on client and server, but for some reason the getter function for it is sided.

commented

I don't understand the jargon did you guys find a solution? and if you did will i have to wait for an update or am i personalty able to fix it? I apologize if this is a stupid question.

commented

You need to wait for an update, the next one will fix the crash.

commented

thank you