Description

This issue seems to stem from HasClientLoadedCurrentWorld returning true in AGameMode::RemovePlayerControllerFromPlayerCount. When removing a player controller, the GameMode checks if a seamless travel is in progress or if the client's player controller has the current world loaded in order to determine whether to decrement NumPlayers or NumTravellingPlayers.
However, if the client disconnected during travel, its controller's NetConnection will be destroyed and cleaned up by the time RemovePlayerControllerFromPlayerCount is called. With no NetConnection, APlayerController::HasClientLoadedCurrentWorld assumes the controller is local and returns true. This causes NumPlayers to be decremented instead of NumTravellingPlayers.

Steps to Reproduce

Create a game mode class derived from AGameMode that sets bUseSeamlessTravel=true.
On a server with multiple clients connected, initiate a seamless travel.
While this travel is happening, disconnect some of the clients (one way this can be done is to call GEngine->HandleDisconnect from the client's APlayerController::GetSeamlessTravelActorList function).
After travel is complete, observe the values for NumPlayers and NumTravellingPlayers.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-220697 in the post.

1
Login to Vote

Unresolved
ComponentUE - Networking
Affects Versions5.5
Target Fix5.6
CreatedJul 31, 2024
UpdatedAug 8, 2024
View Jira Issue