astei / krypton

A Fabric mod that optimizes the Minecraft networking stack and entity tracker.
GNU Lesser General Public License v3.0
367 stars 34 forks source link

Apparent crash when players time out #73

Closed Justsnoopy30 closed 2 years ago

Justsnoopy30 commented 2 years ago

I am not sure if this is krypton's fault, but the crash report points to a krypton mixin at the top of the stacktrace.

Crash report: crash-2022-05-23_18.47.28-server.txt

solonovamax commented 2 years ago

@astei I believe this is the crash that I mentioned in the discord.

The list of mods which we both have are as follows:

I'll look into this further, but I believe I may already have a fix.

(I just wasn't able to reproduce previously, but this should help with reproducing)

solonovamax commented 2 years ago

This is what I said about it in the discord server:

a possible crash due to moving to a new chunk after changing dimensions/dying (caused by a race condition, I believe)

I believe it may have something to do with a player being removed from a dimension, thus the corresponding ObjectSet<ServerPlayerEntity> has already been removed, but for some reason there's a race condition that causes it to execute twice & throw a nullptr.

Justsnoopy30 commented 2 years ago

Another way to reproduce this is simply mismatching the mods on the server and client so that the client is disconnected in the login stage. The server will crash with this.