So I’ve tried a few things…
I’ve basically taken out all of the code related to animations and HUD updates (which I thought might be it) but that didn’t solve it.
I also attempted your solution and removed all of the actors in the level. The only actor left was the actor (character/pawn) that was spawned in at the start. So I have to assume it’s something with the character that’s causing it. But I’m really not sure what that could be unless a component or something is doing it.
It’s worth mentioning this is all in the packaged build when attempting to test the game over Steam (which has worked just fine in many packaged builds before this).
First the game sends the server host to a lobby, then the client finds that session successfully and joins it then (it appears) the transition from the lobby to the map the game will be played on is where it’s failing. If I step through the code I can see the other character appear on the lobby screen briefly while debugging. The client screen is already in the new map but the server then attempts to transition back to the main menu map and into the new one (I guess?) and that’s where it fails.
It’s hard for me to say because I’ve never stepped through it specifically and these were just things Unreal handled in the past. The MatchState changes from EnteringMap to WaitingToStart and then the crash happens. At this point (I believe from debugging) that it’s after the very first tick of the GameMode that it’s failing.
I know it’s some actor being a nullptr, which it may be the client version of the character, I don’t know, but I can see at least one of the characters being passed successfully in the ServerReplicateActors_BuildConsiderList function during debugging.
I just noticed this in the log too:
[2024.10.17-21.37.39:284][657]LogGameMode: >> GameMode::HandleSeamlessTravelPlayer: GymPlayerController_2147482328
[2024.10.17-21.37.39:285][657]LogGameMode: << GameMode::HandleSeamlessTravelPlayer: BP_GymPlayerController_C_2147482209
So it does appear the game recognized both of the PlayerControllers and travels them to the new map. I wish I knew the engine deep enough to say more than just the random things I’ve been looking at. At this point I guess the next step is to disable replication for things on the character one by one until maybe it goes away? I’ve basically torn the game apart trying to identify what the hell is causing this.
Honestly, I’m sure it’s something really stupid.
Cheers
Edit: Adding in this picture of the null actor too in case that holds clues I’m not seeing. It has an inputcomponent so I’m assuming it’s a PlayerController/Pawn/Character? Not really sure… Need to do more digging. I wish I could find the right debug point to just know when the heck this thing turns null!