[4.7 Bug] All Levels simply crash when run from commandline, work great in PIE

Dear Epic,

I have levels that worked great in 4.6, I was testing them earlier today.

I upgraded my project to 4.7

Now the levels run fine when the game is started in that level via PIE.

I can open the level BP and save it just fine

But when I run my game from commandline, the level simply crashes!

#All of my Game’s Levels Simply Crash when I run the Game From Commandline!!!

Here’s my commandline

"F:\VictoryUE4\Git47\UnrealEngine-release\Engine\Binaries\Win64\UE4Editor.exe" "%CD%\JoyMech.uproject" JoyNavV   -game  -ResX=1280 -ResY=960 -WinX=0 -WinY=30 -Fullscreen=false -NoVSync -log

#Please Help!

I dont know what to do to get my game back :slight_smile:

#New Levels

Even if I make a brand new default level, and load that from commandline, it still crashes! Everything is fine in PIE, all the time.

#Crash Analysis

the Crash is occurring here in the UE4 Source Code

FString ULevelScriptBlueprint::CreateLevelScriptNameFromLevel (const ULevel* Level)
{
	// Since all maps are named "PersistentLevel," check to see if this level is the actual OwningWorld->PersistentLevel, or name it based on the map package.
	check(Level && Level->OwningWorld);                         //<~~~ Crash is here
	UObject* LevelPackage = Level->GetOutermost();

	return FPackageName::GetShortName(LevelPackage->GetFName().GetPlainNameString());
}

#Crash

MachineId:1890E56A449E5C1DCB496BA4281C3830

Unknown exception - code 00000001 (first/second chance not available)

Assertion failed: Level && Level->OwningWorld [File:F:\VictoryUE4\Git47\UnrealEngine-release\Engine\Source\Runtime\Engine\Private\LevelScriptBlueprint.cpp] [Li

KERNELBASE + 37901 bytes
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() + 285 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() + 248 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() + 1079 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\core\private\misc\outputdevice.cpp:224]
UE4Editor_Engine!ULevelScriptBlueprint::CreateLevelScriptNameFromLevel() + 102 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\levelscriptblueprint.cpp:59]
UE4Editor_Engine!ULevel::GetLevelScriptBlueprint() + 54 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\level.cpp:1648]
UE4Editor_Kismet!FFindInBlueprintSearchManager::OnAssetAdded() + 535 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismet\private\findinblueprintmanager.cpp:673]
UE4Editor_Kismet!FFindInBlueprintSearchManager::BuildCache() + 732 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismet\private\findinblueprintmanager.cpp:1181]
UE4Editor_Kismet!FFindInBlueprintSearchManager::Get() + 72 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismet\private\findinblueprintmanager.cpp:610]
UE4Editor_Engine!UBlueprint::GetAssetRegistryTags() + 2283 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\blueprint.cpp:715]
UE4Editor_AssetRegistry!<lambda_346c535512d73011dc9f1ff8a2b8a821>::operator()() + 814 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\assetregistry\private\assetregistry.cpp:380]
UE4Editor_AssetRegistry!FAssetRegistry::GetAssets() + 2159 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\assetregistry\private\assetregistry.cpp:442]
UE4Editor_AssetRegistry!FAssetRegistry::GetAssetsByClass() + 330 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\assetregistry\private\assetregistry.cpp:262]
UE4Editor_UnrealEd!FComponentTypeRegistryData::ForceRefreshComponentList() + 5320 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\unrealed\private\componenttyperegistry.cpp:265]
UE4Editor_UnrealEd!FComponentTypeRegistry::FComponentTypeRegistry() + 68 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\unrealed\private\componenttyperegistry.cpp:393]
UE4Editor_UnrealEd!FComponentTypeRegistry::Get() + 49 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\unrealed\private\componenttyperegistry.cpp:363]
UE4Editor_KismetCompiler!FKismetCompilerContext::FinishCompilingClass() + 968 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:1736]
UE4Editor_KismetCompiler!FKismetCompilerContext::Compile() + 8357 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:3508]
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprintInner() + 569 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismetcompiler\private\kismetcompilermodule.cpp:87]
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprint() + 1417 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\kismetcompiler\private\kismetcompilermodule.cpp:128]
UE4Editor_UnrealEd!FKismetEditorUtilities::GenerateBlueprintSkeleton() + 398 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\unrealed\private\kismet2\kismet2.cpp:853]
UE4Editor_UnrealEd!FBlueprintEditorUtils::RegenerateBlueprintClass() + 825 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\editor\unrealed\private\kismet2\blueprinteditorutils.cpp:1183]
UE4Editor_CoreUObject!ULinkerLoad::RegenerateBlueprintClass() + 1079 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:289]
UE4Editor_CoreUObject!ULinkerLoad::FinalizeBlueprint() + 533 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1000]
UE4Editor_CoreUObject!ULinkerLoad::Preload() + 3645 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3014]
UE4Editor_CoreUObject!ULinkerLoad::CreateExport() + 5845 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3606]
UE4Editor_CoreUObject!ULinkerLoad::CreateExportAndPreload() + 27 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2520]
UE4Editor_CoreUObject!ULinkerLoad::LoadAllObjects() + 603 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2628]
UE4Editor_CoreUObject!LoadPackageInternal() + 2055 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:896]
UE4Editor_CoreUObject!ULinkerLoad::VerifyImportInner() + 1194 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2213]
UE4Editor_CoreUObject!ULinkerLoad::VerifyImport() + 195 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1978]
UE4Editor_CoreUObject!ULinkerLoad::VerifyImportInner() + 2160 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2261]
UE4Editor_CoreUObject!ULinkerLoad::VerifyImport() + 195 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:1978]
UE4Editor_CoreUObject!ULinkerLoad::CreateImport() + 1212 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3740]
UE4Editor_CoreUObject!ULinkerLoad::IndexToObject() + 305 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3784]
UE4Editor_CoreUObject!ULinkerLoad::operator<<() + 100 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3967]
UE4Editor_CoreUObject!UObjectProperty::SerializeItem() + 55 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\propertyobject.cpp:31]
UE4Editor_CoreUObject!FPropertyTag::SerializeTaggedProperty() + 218 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\public\uobject\propertytag.h:139]
UE4Editor_CoreUObject!UStruct::SerializeTaggedProperties() + 10102 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\class.cpp:1199]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() + 546 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:147]
UE4Editor_CoreUObject!UArrayProperty::SerializeItem() + 346 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\propertyarray.cpp:77]
UE4Editor_CoreUObject!FPropertyTag::SerializeTaggedProperty() + 218 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\public\uobject\propertytag.h:139]
UE4Editor_CoreUObject!UStruct::SerializeTaggedProperties() + 10102 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\class.cpp:1199]
UE4Editor_CoreUObject!UObject::SerializeScriptProperties() + 292 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\obj.cpp:903]
UE4Editor_CoreUObject!UObject::Serialize() + 581 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\obj.cpp:845]
UE4Editor_Engine!UDataAsset::Serialize() + 22 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\dataasset.cpp:16]
UE4Editor_CoreUObject!ULinkerLoad::Preload() + 3095 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2967]
UE4Editor_CoreUObject!EndLoad() + 974 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1087]
UE4Editor_CoreUObject!LoadPackageInternal() + 2274 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:904]
UE4Editor_Engine!UEngine::LoadMap() + 5202 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\unrealengine.cpp:8863]
UE4Editor_Engine!UEngine::Browse() + 1442 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\unrealengine.cpp:8144]
UE4Editor_Engine!UGameInstance::StartGameInstance() + 438 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\gameinstance.cpp:262]
UE4Editor_Engine!UGameEngine::Init() + 1448 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\engine\private\gameengine.cpp:465]
UE4Editor!FEngineLoop::Init() + 1246 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\launch\private\launchengineloop.cpp:1967]
UE4Editor!GuardedMain() + 932 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\launch\private\launch.cpp:136]
UE4Editor!GuardedMainWrapper() + 26 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [f:\victoryue4\git47\unrealengine-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

#Work Around

I came up with a calmly and logically thought out (complete and total hack) solution:

FString ULevelScriptBlueprint::CreateLevelScriptNameFromLevel (const ULevel* Level)
{  
	// Since all maps are named "PersistentLevel," check to see if this level is the actual OwningWorld->PersistentLevel, or name it based on the map package.
	//check(Level && Level->OwningWorld);
	UObject* LevelPackage = Level->GetOutermost();

	return FPackageName::GetShortName(LevelPackage->GetFName().GetPlainNameString());

}

If I simply comment out the check, the commandline version of the game runs perfectly fine, all levels load just fine, and I even tested this as working in multiplayer games

In other words, I got my whole project back by commenting out this one line.

soooo anyone know why I had to modify the engine code to get the commandline version of the game back? (PIE always worked fine, commandline always crashed)

I’d really like a true solution to this issue :slight_smile:

Hey Rama,

I’m not able to repro this in the 4.7 release binary in a new Rolling Ball template. I mostly copied your command line argument for my shortcut:
“C:\Program Files\Unreal Engine\4.7\Engine\Binaries\Win64\UE4Editor.exe” MyProject -game -ResX=1280 -ResY=960 -WinX=0 -WinY=30 -Fullscreen=false -NoVsync -log

Any idea what I’m doing wrong?

I’ve upgraded 1 other project to 4.7, but it was the release, not custom Github engine build.

So I am not entirely sure what the cause or real solution of the issue is.

All I know is my project would be broken without my hacky work around to the real issue.

I would really appreciate someone to examine the 4.7 engine code related to all this and see what changed in 4.7

If you need my project please send me the private ftp link and I can upload it

#Github Engine Build

Again please note I am using the 4.7 Github engine build, which is why I was able to make a hacky fix for now.

Thanks!

Rama

Hi Rama,

Sorry for the delay on this issue. Is this issue still giving you trouble? I tried upgrading a test project from 4.6.1 (built from source code) to 4.7.0, and then to 4.7.3, and did not see any crashes when using the same commandline parameters that you were using.

Tim

Thanks for checking Tim!

I got some delays in giving Epic the project cause I’m using custom engine build and can’t really email that to Epic

Suffice it to say this is on hold and I hope it just goes away in 4.8, thanks for asking Tim!

#:heart:

Rama

Hi Rama,

I am going to mark this as resolved for internal tracking purposes. If you have a chance to look at this again, or you run into the issue again in 4.8, please feel free to re-open it.

Tim