Open GabeHasWon opened 3 weeks ago
A similar issue seems to happen without Subworld Library (edit: with just DragonLens) if using a self-hosted server.
If I Host + Play on one Terraria instance and join using another, the server will crash shortly after the second client leaves. If I host a dedicated server and join, the server will crash shortly after the client leaves. Both produce the exact same error:
[10:44:35.201] [Server Loop Thread/WARN] [tML]: Silently Caught Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at DragonLens.Content.Tools.Multiplayer.PlayerManagerUpdater.PlayerDisconnect() in DragonLens\Content\Tools\Multiplayer\PlayerManager.cs:line 54
at Terraria.ModLoader.PlayerLoader.PlayerDisconnect(Int32 playerIndex) in tModLoader\Terraria\ModLoader\PlayerLoader.cs:line 1257
at Terraria.Player.Hooks.PlayerDisconnect(Int32 playerIndex) in tModLoader\Terraria\Player.cs:line 269
at Terraria.NetMessage.SyncOnePlayer(Int32 plr, Int32 toWho, Int32 fromWho) in tModLoader\Terraria\NetMessage.cs:line 2740
at Terraria.Netplay.UpdateConnectedClients() in tModLoader\Terraria\Netplay.cs:line 307
at Terraria.Netplay.ServerLoop() in tModLoader\Terraria\Netplay.cs:line 292
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
I haven't tested to see if this is the case in normal multiplayer, but I wouldn't be surprised.
Relevant line: https://github.com/ScalarVector1/DragonLens/blob/f13c56fa093f1c51c3fe969d27de0794fb7f8029/Content/Tools/Multiplayer/PlayerManager.cs#L52
Replication Steps
This happens every time I join, and stops me from using DragonLens on multiplayer servers in its entirety. The only thing to appear is the log below, which Subworld Library handles poorly or something, causing the softlock.
Error