For anyone coming across this, although I don’t have much clue on why really this happens. This worked for me. I’m using 4.27 and noticed after installing the Steam client I get a crash due to NetDriver becoming nullptr in this part of the engine code, when I pass -log -server:
if (NetDriver == nullptr)
{
GEngine->BroadcastNetworkFailure(this, NULL, ENetworkFailure::NetDriverCreateFailure);
return false;
}
FString Error;
if( !NetDriver->InitListen( this, InURL, false, Error ) )
{
GEngine->BroadcastNetworkFailure(this, NetDriver, ENetworkFailure::NetDriverListenFailure, Error);
UE_LOG(LogWorld, Log, TEXT("Failed to listen: %s"), *Error );
GEngine->DestroyNamedNetDriver(this, NetDriver->NetDriverName);
For some reason the first line inside the second if block invalidates NetDriver (there is a nullptr check before the second if). If I change it to the following, it won’t crash but does not listen either:
if (NetDriver == nullptr)
{
GEngine->BroadcastNetworkFailure(this, NULL, ENetworkFailure::NetDriverCreateFailure);
return false;
}
FString Error;
if( !NetDriver->InitListen( this, InURL, false, Error ) )
{
GEngine->BroadcastNetworkFailure(this, NetDriver, ENetworkFailure::NetDriverListenFailure, Error);
UE_LOG(LogWorld, Log, TEXT("Failed to listen: %s"), *Error );
if (!NetDriver) {
return false;
}
GEngine->DestroyNamedNetDriver(this, NetDriver->NetDriverName);
So, how did I solved it for now? I tried to uninstall the Steam Client and sadly it did not work. So, I checked my System Restore backups and luckily I had one a few hours prior to the Steam installation. I restored the system to that point and viola it’s gone.
Perhaps Steam Client changes something, the Unreal plugin is not happy with.