Immersive Engineering

Immersive Engineering

134M Downloads

[1.16.1] Ticking block entity + NPE server-side crash when connecting to server

Protected opened this issue ยท 6 comments

commented

Description of the issue:

I have experienced this twice today. When I connect, my server crashes with a NPE related to... redstone probe connectors? (I do have some in my place.) Note that it had never happened prior to my recent update of IE, which was from the previous version 4.0.0pre27.
It doesn't happen every time I connect, and I don't yet know if there is a way to reproduce it on demand.

Crashlog:

https://gist.github.com/Protected/c380ee3e2a6dda8d225027a2e000a8b6

Versions & Modlist

IE: 4.0.1-120
Forge: 32.0.108

commented

Well, that escalated quickly. I don't seem to be able to connect to my server anymore without crashing it (or, if I'm lucky, just the client).

Here's the server-side wire log: latest.log

NOTE that there are two connection attempts on that log; the second one crashes the server.

commented

I moved the world to my test server, confirmed that the test server crashed likewise, then enabled validate nets and tried again. With validate nets enabled, I was able to get into the (test) server for the first time. I don't know if this was a coincidence or not. This is the tail of the log from that execution (the server did not immediately crash): https://gist.github.com/Protected/cc344c0cc61304a8e36ecce6176ee396

On the second connection attempt the server crashed immediately with the expected error (on the probe). While I was previously connected, I checked and none of my probes were missing (I have probes on: squeezer redstone panel, fermenter redstone panel, biodiesel tank bottom side panel, and the sides of three HV capacitors plugged onto the biodiesel generator).

Edit: sanitizeConnections is also on in the test server (not the main server). Didn't help.

commented

In my test server, and using the "replace player file with coordinates out of range" method to be able connect each time, I tried removing redstone probe connectors to see if it fixed the issue:

  1. Removed tank probe and associated wire. (Still crashing)
  2. Replaced tank probe and removed empty capacitor probe and associated wires. (Still crashing)
  3. Removed the remaining capacitor probes. (Still crashing)
  4. Removed the tank probe again. At this point, no probes are left in the chunk from the original crash report above. Still crashing, but now the crash inducing block is the squeezer's probe, which is in a different chunk. (diagonally adjacent)
  5. Removed the probes from the squeezer and fermenter. All 6 probes have now been removed from the area; nothing else has been removed. Crash "solved"!

You can see the tank and its probe in the screenshot from my previous comment (to the right of the house). What follow are screenshots of the remaining five probes:

image

image

Quick signal color key
Squeezer probe: Light blue/Lime
Fermenter probe: Light blue/Pink
Tank probe: Black/Yellow
Capacitor probes: White/White (signal color irrelevant in this case)

commented

Some more information. In my main server (no wire logging or sanitize connections enabled) I edited my position with NBT explorer to load out of range of my building, then approached slowly so I could actually connect to the server and see what was up. I noted that the probes in the Squeezer and Fermenter are NOT in the chunk whose coordinates are in the crash log. The probes in the Tank and Capacitors are. The tank is mostly but not entirely full. Two capacitors are partially filled, and one is empty. No machines were running except for the crusher, which stopped shortly after I arrived (the crusher is independent and not wired to any redstone nets).

I let things run for a bit, then tried to disconnect and reconnect. This triggered a strictly client-side crash with no server-side errors. Here's the client-side crash log for that, in case it's relevant (it looks relevant): https://gist.github.com/Protected/afcf20add363fd068a39fd1b89e2ef0c

EDIT: Screenshot for connectors mentioned in this client-side crash (might not be the same issue after all):
image

Afterwards, I started the client again, attempted to connect, and got the usual server crash.

One thing I didn't mention before: I have tested this issue with immersive portals disabled; disabling immersive portals doesn't prevent this crash.

commented

I'm afraid this (4.1.0-pre.23) hasn't solved the problem yet.

From the client-side log: [29Sep2020 15:28:33.716] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [immersiveengineering] Found status: AHEAD Current: 1.16.1-4.1.0-pre.23 Target: null

Server-side crash report: https://gist.github.com/Protected/02ad01f5b7ba23e3aa071238842da21f

I tried three times including a client-side restart and disabling sanitize connections and validate nets on the server, but nothing changed.

commented

Fixed in the commit above; if anyone else is experiencing this problem just download that.