Better handle failure to find spawn position / harden for multiplayer #2838
Labels
Multiplayer
Affects aspects not visible in Singleplayer mode only
Type: Bug
Issues reporting and PRs fixing problems
During today's play test we managed to finally completely crash a server, which has been rare lately. Initially I thought maybe it could be related to a weird interaction between the broken crouching (#2651 / #2565) and character prediction issues (#2358, #2469, #2468) but on digging into the stacktrace I found a todo that could explain the crash much more simply:
On line 76 in
PlayerFactory
there is a TODO about handling the lack of a value from theOptional
. Which is exactly what took down the entire server. That's a bit much.Chances are what caused the crash was @smsunarto logging in a third client that somehow failed to find a spawn point. Oddly his first two clients somehow ended up inhabiting the same monkey head. Very peculiar. Maybe from not varying the
-homedir
? Would be good to know if that was the case!But regardless of whether a quirky setup caused the failure to find a spawn point that shouldn't take down the entire server. We should gracefully disconnect that one client if that spawn logic finds no value, offering a helpful error message, then let the server continue on its merry path.
The text was updated successfully, but these errors were encountered: