Just upgraded to 4.8.1, building our own engine binaries.
Repro Steps:
Launch a server: start .\engine\Engine\Binaries\Win64\UE4Editor.exe D:\p4\trunk\qc\QC.uproject -server -log
Launch a client to connect to it: start .\engine\Engine\Binaries\Win64\UE4Editor.exe D:\p4\trunk\qc\QC.uproject 127.0.0.1 -game
Observe error when client starts up: “The map specified on the commandline … could not be found”
Was also able to repro by launching a standalone dedicated server from the editor with 2 clients.
Digging into the code, it looks like UGameInstance::StartGameInstance is panicking, Engine->Browse returns EBrowseReturnVal::Pending, presumably because this is a network connection. The rest of the function then assumes this a fatal error and exits out. I temporarily fixed it by simply leaving the function without fuss when we get a pending state, but I have no idea what the correct solution is.
void UAbatronGameInstance::StartGameInstance()
{
GotoInitialState();
//The below extracts to see if we are trying to run an localhost connection or not for dev testing
UEngine* const Engine = GetEngine();
// Create default URL.
// @note: if we change how we determine the valid start up map update LaunchEngineLoop's GetStartupMap()
FURL DefaultURL;
DefaultURL.LoadURLConfig(TEXT("DefaultPlayer"), GGameIni);
// Enter initial world.
EBrowseReturnVal::Type BrowseRet = EBrowseReturnVal::Failure;
FString Error;
TCHAR Parm[4096] = TEXT("");
const TCHAR* Tmp = FCommandLine::Get();
#if UE_BUILD_SHIPPING
// In shipping don't allow an override
Tmp = TEXT("");
#endif // UE_BUILD_SHIPPING
if (!FParse::Token(Tmp, Parm, ARRAY_COUNT(Parm), 0) || Parm[0] == '-')
{
//FCString::Strcpy(Parm, *(DefaultMap + GameMapsSettings->LocalMapOptions));
}
FURL URL(&DefaultURL, Parm, TRAVEL_Partial);
//Internal means local host 127.0.0.1 =)
if (URL.Valid && URL.IsInternal())
{
BrowseRet = Engine->Browse(*WorldContext, URL, Error);
}
else
{
//This needs to run to startup commandline maps
Super::StartGameInstance();
}
}
The real problem is that the Pending state is not handled correctly. Currently you can’t link to 'UGameSettings" to completely override the base class.
Above is my fix to still use the launcher version of the game. If you want to modify the engine for a better fix: Then just add into the base class:
if (BrowseRet == EBrowseReturnVal::Pending)
{
return;
}
Insert before the Success check. This works aswell. I would like Epic to eventually un privatize access to the UGameSettings =)