Engine crash while compile and restart

Today I was working on adding some c++ code to my project, it was not compiling because I forgot the AClassName:: in a function declaration, I added it via a copy signature in visual studio (right click in the header file on the function that needs a declaration). After I hit compile in the UE editor it crashes. When I try to restart the editor it also keeps crashing, I have tried a full system reboot. The doesn’t do anything right now and it compiles fine in visual studio.

Here is my crash report when I try to restart the editor for this project:

Assertion failed: Object [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp] [Line: 7968] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:440]
UE4Editor_Engine!UEngine::GetWorldFromContextObject() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\unrealengine.cpp:7970]
UE4Editor_Engine!UGameplayStatics::GetAllActorsOfClass() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\gameplaystatics.cpp:604]
UE4Editor_Hellskrieg!AZombieManager::AZombieManager() [c:\users\\desktop\\ 4.12\source\\zombiemanager.cpp:15]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:3340]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:725]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:819]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance::ExecuteIfSafe() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:1021]
UE4Editor_Core!TBaseMulticastDelegate::Broadcast() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:921]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:461]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\projects\private\moduledescriptor.cpp:398]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\projects\private\projectmanager.cpp:53]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2163]
UE4Editor!FEngineLoop::PreInit() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:1609]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launch.cpp:114]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll



EDIT: this is the .log file it may be needed too

Log file open, 08/05/16 12:59:11
LogInit:Display: Running engine for game: Secret for now
LogPlatformFile: Not using cached read wrapper
LogInit:Display: RandInit(1508699576) SRandInit(1508699577).
LogTaskGraph: Started task graph with 4 named threads and 7 total threads with 1 sets of task threads.
LogStats: Stats thread started at 0.112810
LogInit: Version: 4.12.5-3039270+++UE4+Release-4.12
LogInit: API Version: 2992821
LogInit: Net Version: 3039270
LogDevObjectVersion: Number of dev versions registered: 13
LogDevObjectVersion:   Dev-Blueprints (B0D832E4-1F89-4F0D-ACCF-7EB736FD4AA2): 3
LogDevObjectVersion:   Dev-Build (E1C64328-A22C-4D53-A36C-8E866417BD8C): 0
LogDevObjectVersion:   Dev-Core (375EC13C-06E4-48FB-B500-84F0262A717E): 1
LogDevObjectVersion:   Dev-Editor (E4B068ED-F494-42E9-A231-DA0B2E46BB41): 2
LogDevObjectVersion:   Dev-Framework (CFFC743F-43B0-4480-9391-14DF171D2073): 6
LogDevObjectVersion:   Dev-Mobile (B02B49B5-BB20-44E9-A304-32B752E40360): 0
LogDevObjectVersion:   Dev-Networking (A4E4105C-59A1-49B5-A7C5-40C4547EDFEE): 0
LogDevObjectVersion:   Dev-Online (39C831C9-5AE6-47DC-9A44-9C173E1C8E7C): 0
LogDevObjectVersion:   Dev-Physics (78F01B33-EBEA-4F98-B9B4-84EACCB95AA2): 0
LogDevObjectVersion:   Dev-Platform (6631380F-2D4D-43E0-8009-CF276956A95A): 0
LogDevObjectVersion:   Dev-Rendering (12F88B9F-8875-4AFC-A67C-D90C383ABD29): 2
LogDevObjectVersion:   Dev-Sequencer (7B5AE74C-D270-4C10-A958-57980B212A5A): 0
LogDevObjectVersion:   Dev-VR (D7296918-1DD6-4BDD-9DE2-64A83CC13884): 0
LogInit: Compiled (64-bit): Jul  6 2016 09:09:46
LogInit: Compiled with Visual C++: 19.00.23026.00
LogInit: Build Configuration: Development
LogInit: Branch Name: ++UE4+Release-4.12
LogInit: Command line:  
LogInit: Base directory: C:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/Win64/
LogInit: Installed Engine Build: 1
LogInit: Using libcurl 7.41.0
LogInit:  - built for x86_64-pc-win32
LogInit:  - supports SSL with WinSSL
LogInit:  - other features:
LogInit:      CURL_VERSION_SSL
LogInit:      CURL_VERSION_IPV6
LogInit:      CURL_VERSION_ASYNCHDNS
LogInit:      CURL_VERSION_LARGEFILE
LogInit:      CURL_VERSION_IDN
LogInit:  CurlRequestOptions (configurable via config and command line):
LogInit:  - bVerifyPeer = true  - Libcurl will verify peer certificate
LogInit:  - bUseHttpProxy = false  - Libcurl will NOT use HTTP proxy
LogInit:  - bDontReuseConnections = false  - Libcurl will reuse connections
LogInit:  - CertBundlePath = nullptr  - Libcurl will use whatever was configured at build time.
LogInit: Presizing for max 8388607 objects, including 0 objects not considered by GC, pre-allocating 0 bytes for permanent pool.
LogInit: Object subsystem initialized
[2016.08.05-10.59.11:496][  0]LogInit: Selected Device Profile: [Windows]
[2016.08.05-10.59.11:496][  0]LogInit: Applying CVar settings loaded from the selected device profile: [Windows]
[2016.08.05-10.59.11:506][  0]LogInit: Computer: DESKTOP-A3TBIM5
[2016.08.05-10.59.11:506][  0]LogInit: User: 
[2016.08.05-10.59.11:506][  0]LogInit: CPU Page size=65536, Cores=4
[2016.08.05-10.59.11:506][  0]LogInit: High frequency timer resolution =2.249997 MHz
[2016.08.05-10.59.11:506][  0]LogMemory: Memory total: Physical=7.8GB (8GB approx)
[2016.08.05-10.59.11:506][  0]LogMemory: Platform Memory Stats for Windows
[2016.08.05-10.59.11:506][  0]LogMemory: Process Physical Memory: 192.36 MB used, 192.36 MB peak
[2016.08.05-10.59.11:506][  0]LogMemory: Process Virtual Memory: 194.97 MB used, 194.97 MB peak
[2016.08.05-10.59.11:506][  0]LogMemory: Physical Memory: 3907.33 MB used, 8012.34 MB total
[2016.08.05-10.59.11:506][  0]LogMemory: Virtual Memory: 553.98 MB used, 134217728.00 MB total
[2016.08.05-10.59.11:860][  0]LogTextLocalizationManager: No translations for ('nl-NL') exist, falling back to 'en' for localization and internationalization data.
[2016.08.05-10.59.12:307][  0]LogD3D11RHI: D3D11 adapters:
[2016.08.05-10.59.12:674][  0]LogD3D11RHI:    0. 'NVIDIA GeForce GTX 950M            ' (Feature Level 11_0)
[2016.08.05-10.59.12:674][  0]LogD3D11RHI:       4037/0/3959 MB DedicatedVideo/DedicatedSystem/SharedSystem, Outputs:1, VendorId:0x10de
[2016.08.05-10.59.12:689][  0]LogD3D11RHI:    1. 'Intel(R) HD Graphics 530' (Feature Level 11_0)
[2016.08.05-10.59.12:689][  0]LogD3D11RHI:       128/0/3959 MB DedicatedVideo/DedicatedSystem/SharedSystem, Outputs:0, VendorId:0x8086
[2016.08.05-10.59.12:692][  0]LogD3D11RHI:    2. 'Microsoft Basic Render Driver' (Feature Level 11_0)
[2016.08.05-10.59.12:692][  0]LogD3D11RHI:       0/0/3959 MB DedicatedVideo/DedicatedSystem/SharedSystem, Outputs:0, VendorId:0x1414
[2016.08.05-10.59.12:692][  0]LogD3D11RHI: Chosen D3D11 Adapter: 0
[2016.08.05-10.59.12:700][  0]LogD3D11RHI: Creating new Direct3DDevice
[2016.08.05-10.59.12:700][  0]LogD3D11RHI:     GPU DeviceId: 0x139a (for the marketing name, search the web for "GPU Device Id")
[2016.08.05-10.59.12:700][  0]LogWindows: EnumDisplayDevices:
[2016.08.05-10.59.12:701][  0]LogWindows:    0. 'Intel(R) HD Graphics 530' (P:1 D:1)
[2016.08.05-10.59.12:701][  0]LogWindows:    1. 'Intel(R) HD Graphics 530' (P:0 D:0)
[2016.08.05-10.59.12:701][  0]LogWindows:    2. 'Intel(R) HD Graphics 530' (P:0 D:0)
[2016.08.05-10.59.12:702][  0]LogWindows: DebugString: PrimaryIsNotTheChoosenAdapter PrimaryIsNotTheChoosenAdapter PrimaryIsNotTheChoosenAdapter FoundDriverCount:0 
[2016.08.05-10.59.12:702][  0]LogD3D11RHI:     Adapter Name: NVIDIA GeForce GTX 950M            
[2016.08.05-10.59.12:702][  0]LogD3D11RHI:   Driver Version: Unknown (internal:Unknown, unified:Unknown)
[2016.08.05-10.59.12:702][  0]LogD3D11RHI:      Driver Date: Unknown
[2016.08.05-10.59.12:702][  0]LogRHI: Texture pool is 1361 MB (70% of 1945 MB)
[2016.08.05-10.59.12:731][  0]LogD3D11RHI: Async texture creation enabled
[2016.08.05-10.59.12:752][  0]LogD3D11RHI: GPU Timing Frequency: 1000.000000 (Debug: 2 1)
[2016.08.05-10.59.12:754][  0]LogShaderCompilers: Guid format shader working directory is -17 characters bigger than the processId version (../../../../../../Users//Desktop// 4.12/Intermediate/Shaders/WorkingDirectory/512/).
[2016.08.05-10.59.12:754][  0]LogShaderCompilers: Cleaned the shader compiler working directory 'C:/Users//AppData/Local/Temp/UnrealShaderWorkingDir/F8FA99ED424F5AC03CBFD580BFEB08BF/'.
[2016.08.05-10.59.12:754][  0]LogShaderCompilers:Display: Using Local Shader Compiler.
[2016.08.05-10.59.13:801][  0]LogTemp:Display: Loaded TP AllDesktopTargetPlatform
[2016.08.05-10.59.13:813][  0]LogTemp:Display: Loaded TP WindowsClientTargetPlatform
[2016.08.05-10.59.13:825][  0]LogTemp:Display: Loaded TP WindowsNoEditorTargetPlatform
[2016.08.05-10.59.13:837][  0]LogTemp:Display: Loaded TP WindowsServerTargetPlatform
[2016.08.05-10.59.13:849][  0]LogTemp:Display: Loaded TP WindowsTargetPlatform
[2016.08.05-10.59.13:858][  0]LogTemp:Display: Loaded TP AndroidTargetPlatform
[2016.08.05-10.59.13:868][  0]LogTemp:Display: Loaded TP Android_ASTCTargetPlatform
[2016.08.05-10.59.13:878][  0]LogTemp:Display: Loaded TP Android_ATCTargetPlatform
[2016.08.05-10.59.13:887][  0]LogTemp:Display: Loaded TP Android_DXTTargetPlatform
[2016.08.05-10.59.13:898][  0]LogTemp:Display: Loaded TP Android_ETC1TargetPlatform
[2016.08.05-10.59.13:908][  0]LogTemp:Display: Loaded TP Android_ETC2TargetPlatform
[2016.08.05-10.59.13:927][  0]LogTemp:Display: Loaded TP Android_MultiTargetPlatform
[2016.08.05-10.59.13:927][  0]LogTemp:Display: Loaded TP Android_PVRTCTargetPlatform
[2016.08.05-10.59.13:929][  0]LogTemp:Display: Loaded TP HTML5TargetPlatform
[2016.08.05-10.59.13:955][  0]LogTemp:Display: Loaded TP IOSTargetPlatform
[2016.08.05-10.59.13:964][  0]LogTemp:Display: Loaded TP TVOSTargetPlatform
[2016.08.05-10.59.13:974][  0]LogTemp:Display: Loaded TP LinuxNoEditorTargetPlatform
[2016.08.05-10.59.13:990][  0]LogTemp:Display: Loaded TP LinuxServerTargetPlatform
[2016.08.05-10.59.14:010][  0]LogTemp:Display: Loaded TP LinuxTargetPlatform
[2016.08.05-10.59.14:010][  0]LogTargetPlatformManager:Display: Building Assets For Windows
[2016.08.05-10.59.14:131][  0]LogDerivedDataCache:Display: Max Cache Size: 512 MB
[2016.08.05-10.59.14:187][  0]LogDerivedDataCache: Loaded boot cache 0.06s 48MB C:/Users//AppData/Local/UnrealEngine/4.12/DerivedDataCache/Boot.ddc.
[2016.08.05-10.59.14:187][  0]LogDerivedDataCache:Display: Loaded Boot cache: C:/Users//AppData/Local/UnrealEngine/4.12/DerivedDataCache/Boot.ddc
[2016.08.05-10.59.14:187][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  Pak pak cache file ../../../../../../Users//Desktop// 4.12/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
[2016.08.05-10.59.14:187][  0]LogDerivedDataCache: Unable to find inner node Pak for hierarchical cache Hierarchy.
[2016.08.05-10.59.14:187][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  CompressedPak pak cache file ../../../../../../Users//Desktop// 4.12/DerivedDataCache/Compressed.ddp not found, will not use a pak cache.
[2016.08.05-10.59.14:187][  0]LogDerivedDataCache: Unable to find inner node CompressedPak for hierarchical cache Hierarchy.
[2016.08.05-10.59.14:206][  0]LogDerivedDataCache:Display: Pak cache opened for reading ../../../Engine/DerivedDataCache/Compressed.ddp.
[2016.08.05-10.59.14:218][  0]LogDerivedDataCache: Using Local data cache path C:/Users//AppData/Local/UnrealEngine/Common/DerivedDataCache: Writable
[2016.08.05-10.59.14:452][  0]LogInit: Selected Device Profile: [Windows]
[2016.08.05-10.59.14:452][  0]LogContentStreaming: Texture pool size is 0.00 MB
[2016.08.05-10.59.14:630][  0]LogMeshUtilities: No automatic mesh reduction module available
[2016.08.05-10.59.14:630][  0]LogMeshUtilities: No automatic mesh merging module available
[2016.08.05-10.59.14:630][  0]LogMeshUtilities: No distributed automatic mesh merging module available
[2016.08.05-10.59.14:965][  0]LogAssetRegistry: FAssetRegistry took 0.0219 seconds to start up
[2016.08.05-10.59.14:991][  0]LogPackageLocalizationCache: Processed 5 localized package path(s) for 1 prioritized culture(s) in 0.020212 seconds
[2016.08.05-10.59.14:997][  0]LogUObjectArray: 28739 objects as part of root set at end of initial load.
[2016.08.05-10.59.14:997][  0]LogUObjectAllocator: 5855632 out of 0 bytes used by permanent object pool.
[2016.08.05-10.59.14:997][  0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
[2016.08.05-10.59.15:008][  0]LogInit: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
[2016.08.05-10.59.15:276][  0]LogSlate: SlateFontCache - WITH_FREETYPE: 1, WITH_HARFBUZZ: 1
[2016.08.05-10.59.15:276][  0]LogSlate: SlateFontCache - WITH_FREETYPE: 1, WITH_HARFBUZZ: 1
[2016.08.05-10.59.17:816][  0]LogUdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
[2016.08.05-10.59.17:884][  0]LogWindows: Windows GetLastError: De bewerking is voltooid. (0)
                                                                                                Dutch for: "operation is finished."

Please help me

Hello ,

Whenever the editor crashes and continues to crash after making a code change, the change is likely the cause. Can you try reverting the change you made prior to this crash occurring and seeing if the editor will stop crashing upon launch?

I tried that and it unfortunatly doesn’t work, the code doesn’t compile at all and the engine keeps crashing

I don’t know how but after commenting some random lines it works

Did you try:

  1. Removing Binaries folder
  2. GeneratingVS files
  3. Rebuild

After reverting changes?

What lines are you commenting? If commenting out things is causing it to work, those lines are the culprit.

That would most likely be due to the GetWorld() part of it. Whenever you use GetWorld(), it’s best to check to make sure that GetWorld() isn’t returning a null pointer first. This would explain why the editor is crashing when it opens, as it tries to call this function before the level is initialized, resulting in a null pointer being given, causing the assert.

Edit: To check, just surround your statement that is using GetWorld() with an if statement like so:

if(GetWorld())
{
   //Statement that uses GetWorld()
}

Apperiantly the engine doesn’t like this line: UGameplayStatics::GetAllActorsOfClass(GetWorld(), AZombieSpawn::StaticClass(), ZombieSpawns);
which I found elsewhere in the answerhub

Yes that was it thank you very much

Quick question: Is there a way to wait until GetWorld() can be used and if so how?

Exactly as I mentioned. If you encase the function where you’re using GetWorld() with an if statement that checks to see if GetWorld is returning a value, it will continue to fail the if statement until the level has been initialized. What function is this line of code in?