UE4.8 Crash On Startup

When i try to launch my project i get this crash report data:

Assertion failed: !Cache.InstanceBaseInvMap.Contains(BaseInfo.BasePtr) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Foliage\Private\FoliageInstanceBase.cpp] [Line

KERNELBASE
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_Foliage!FFoliageInstanceBaseCache::CompactInstanceBaseCache() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\foliage\private\foliageinstancebase.cpp:241]
UE4Editor_Foliage!AInstancedFoliageActor::PostLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\foliage\private\instancedfoliage.cpp:2325]
UE4Editor_CoreUObject!UObject::ConditionalPostLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\obj.cpp:718]
UE4Editor_CoreUObject!UObject::PostLoadSubobjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\obj.cpp:739]
UE4Editor_CoreUObject!UObject::ConditionalPostLoadSubobjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\obj.cpp:807]
UE4Editor_CoreUObject!UObject::ConditionalPostLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\obj.cpp:715]
UE4Editor_CoreUObject!EndLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1250]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1006]
UE4Editor_UnrealEd!UEditorEngine::Map_Load() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\editorserver.cpp:2291]
UE4Editor_UnrealEd!UEditorEngine::HandleMapCommand() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\editorserver.cpp:5768]
UE4Editor_UnrealEd!UEditorEngine::Exec() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\editorserver.cpp:5262]
UE4Editor_UnrealEd!UUnrealEdEngine::Exec() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\unrealedsrv.cpp:742]
UE4Editor_UnrealEd!FEditorFileUtils::LoadMap() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\filehelpers.cpp:1992]
UE4Editor_UnrealEd!FEditorFileUtils::LoadDefaultMapAtStartup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\filehelpers.cpp:3193]
UE4Editor_UnrealEd!FUnrealEdMisc::OnInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\unrealedmisc.cpp:300]
UE4Editor_UnrealEd!EditorInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\unrealed.cpp:86]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:133]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

When i try to debug the project in VS i basicly get “UE4Editor.exe” has triggered a breakpoint. And i basiclly get the same report in the debug log.

I seems to be a problem with adding a C++ class. It worked fine till i added a C++ class and wrote some basic code in it. All i did was adding a constructor to a game mode.

Hey MazyModz-

If the problem arose after adding code to the project then there may be an issue with the class that was added. If you delete the .h and .cpp files for the new class from the project’s Source folder and then right click on the .uproject and “Generate Visual project files” are you able to build the solution/open the project?

Cheers

Hi MazyModz,

Does this occur in a clean, blank project with no additional content? Are you using the binary version of the engine or the github source build? Additionally, what is the code you are adding before compiling, can you post the code so I can take a look and see what may be occurring?

Don’t know what i did, but it works now after opening the project later.