V4.4 - Crash during networked play in editor

I ran across the following when testing some network related code in the editor.

If you set up multiplayer to be 1 player, no server options, running a dedicated server, use multiple processes, and playing as client, it stumbles across the following code.

In PendingNetGame.cpp
ln 172, retrieve the LocalPlayer, which may be NULL (as indicated by the next line)
ln 191, retrieve the Unique Net ID…which dereferences LocalPlayer which may be NULL, hence the crash.

I’ll continue to look for workarounds with respect to my testing, but hey, bug report for y’all.

This is happening because, in UEditorEngine::CreatePIEGameInstance,
the world context is being marked as “RunAsDedicated” in both the client and the server.

As the client is being marked as RunAsDedicated, no default players are created, among other things…

The server should of course be marked as ‘RunAsDedicated’, but the client is just running as a client, and needs a local player.

I managed to fix by changing

Thanks for the info, Roxie. The PIE options for running under multiple processes is in a big need of a re-haul, which we hope to get to soon.

Awesome. If you need a guinea pig, I’d be glad to help. I’m building an OnlineSubystem module (as a plugin, which works great, BTW), so I’m exercising some of that stuff pretty heavily.

I’m fine until you overhaul, though. Doing local patches and workarounds.