Editor wont open after it crashed while compiling C++

I was looking at a blueprint while the editor was compiling my C++ code when it crashed. I am now not able to open my project anymore as now it just keeps crashing when I open my project. I have tried deleting Binaries, Intermediate, Saved and project.sln file and building from Visual Studio. I can’t get the editor to open now. I seem to have 2 different stack traces in the log and crash reporter. Any help is appreciated.

Here is the crash reporter output

LoginId:bcefbec840d18d0e183410a66dcd1fa8
EpicAccountId:5f2d0d64b88740a4a1fa699673cf1f59

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000

UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:933]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:1022]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(FName,bool)>::ExecuteIfSafe() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:854]
UE4Editor_Core!TBaseMulticastDelegate<void,FName,bool>::Broadcast() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:1013]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:493]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\build\++ue4\sync\engine\source\runtime\projects\private\moduledescriptor.cpp:554]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\build\++ue4\sync\engine\source\runtime\projects\private\projectmanager.cpp:63]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3517]
UE4Editor!FEngineLoop::PreInitPostStartupScreen() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2889]
UE4Editor!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:131]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:263]
UE4Editor!__scrt_common_main_seh() [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

But here is the the last bit of the log file

020.01.25-03.12.41:028][  0]LogWindows: DebugString: FoundDriverCount:3 
[2020.01.25-03.12.41:028][  0]LogD3D11RHI:     Adapter Name: NVIDIA GeForce GTX 750 Ti
[2020.01.25-03.12.41:028][  0]LogD3D11RHI:   Driver Version: 441.87 (internal:26.21.14.4187, unified:441.87)
[2020.01.25-03.12.41:028][  0]LogD3D11RHI:      Driver Date: 12-24-2019
[2020.01.25-03.12.41:028][  0]LogRHI: Texture pool is 1405 MB (70% of 2007 MB)
[2020.01.25-03.12.41:141][  0]LogD3D11RHI: RHI has support for 64 bit atomics
[2020.01.25-03.12.41:142][  0]LogD3D11RHI: Async texture creation enabled
[2020.01.25-03.12.41:169][  0]LogD3D11RHI: GPU Timing Frequency: 1000.000000 (Debug: 2 1)
[2020.01.25-03.12.41:921][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'AllDesktop'
[2020.01.25-03.12.41:991][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ASTC'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ATC'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_DXT'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ETC1'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ETC1a'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ETC2'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_PVRTC'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'AndroidClient'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ASTCClient'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ATCClient'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_DXTClient'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ETC1Client'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ETC1aClient'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_ETC2Client'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_PVRTCClient'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_Multi'
[2020.01.25-03.12.41:992][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Android_MultiClient'
[2020.01.25-03.12.42:049][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'IOSClient'
[2020.01.25-03.12.42:050][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'IOS'
[2020.01.25-03.12.42:068][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LinuxNoEditor'
[2020.01.25-03.12.42:087][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LinuxClient'
[2020.01.25-03.12.42:106][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LinuxServer'
[2020.01.25-03.12.42:121][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LinuxAArch64NoEditor'
[2020.01.25-03.12.42:135][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LinuxAArch64Client'
[2020.01.25-03.12.42:152][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LinuxAArch64Server'
[2020.01.25-03.12.42:220][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Lumin'
[2020.01.25-03.12.42:220][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'LuminClient'
[2020.01.25-03.12.42:251][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'TVOSClient'
[2020.01.25-03.12.42:251][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'TVOS'
[2020.01.25-03.12.42:304][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'WindowsNoEditor'
[2020.01.25-03.12.42:322][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'Windows'
[2020.01.25-03.12.42:340][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'WindowsClient'
[2020.01.25-03.12.42:357][  0]LogTargetPlatformManager: Display: Loaded TargetPlatform 'WindowsServer'
[2020.01.25-03.12.42:357][  0]LogTargetPlatformManager: Display: Building Assets For Windows
[2020.01.25-03.12.42:363][  0]LogAudioDebug: Display: Lib vorbis DLL was dynamically loaded.
[2020.01.25-03.12.42:417][  0]LogShaderCompilers: Guid format shader working directory is 13 characters bigger than the processId version (F:/dev/projects/ue4/zombie-horde/Intermediate/Shaders/WorkingDirectory/11752/).
[2020.01.25-03.12.42:417][  0]LogShaderCompilers: Cleaned the shader compiler working directory 'C:/Users/Jason/AppData/Local/Temp/UnrealShaderWorkingDir/CB8E14EF4BC62691B3A03BB42543B548/'.
[2020.01.25-03.12.42:418][  0]LogXGEController: Cleaning working directory: C:/Users/Jason/AppData/Local/Temp/UnrealXGEWorkingDir/
[2020.01.25-03.12.42:418][  0]LogXGEController: Cannot use XGE Controller as Incredibuild is not installed on this machine.
[2020.01.25-03.12.42:418][  0]LogShaderCompilers: Cannot use XGE Shader Compiler as Incredibuild is not installed on this machine.
[2020.01.25-03.12.42:418][  0]LogShaderCompilers: Display: Using Local Shader Compiler.
[2020.01.25-03.12.44:470][  0]LogDerivedDataCache: Display: Max Cache Size: 512 MB
[2020.01.25-03.12.44:601][  0]LogDerivedDataCache: Loaded boot cache 0.13s 78MB C:/Users/Jason/AppData/Local/UnrealEngine/4.24/DerivedDataCache/Boot.ddc.
[2020.01.25-03.12.44:602][  0]LogDerivedDataCache: Display: Loaded Boot cache: C:/Users/Jason/AppData/Local/UnrealEngine/4.24/DerivedDataCache/Boot.ddc
[2020.01.25-03.12.44:602][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  Pak pak cache file F:/dev/projects/ue4/zombie-horde/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
[2020.01.25-03.12.44:602][  0]LogDerivedDataCache: Unable to find inner node Pak for hierarchical cache Hierarchy.
[2020.01.25-03.12.44:602][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  CompressedPak pak cache file F:/dev/projects/ue4/zombie-horde/DerivedDataCache/Compressed.ddp not found, will not use a pak cache.
[2020.01.25-03.12.44:602][  0]LogDerivedDataCache: Unable to find inner node CompressedPak for hierarchical cache Hierarchy.
[2020.01.25-03.12.44:619][  0]LogDerivedDataCache: Display: Pak cache opened for reading ../../../Engine/DerivedDataCache/Compressed.ddp.
[2020.01.25-03.12.44:620][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  EnterprisePak pak cache file ../../../Enterprise/DerivedDataCache/Compressed.ddp not found, will not use a pak cache.
[2020.01.25-03.12.44:620][  0]LogDerivedDataCache: Unable to find inner node EnterprisePak for hierarchical cache Hierarchy.
[2020.01.25-03.12.44:622][  0]LogDerivedDataCache: Using Local data cache path C:/Users/Jason/AppData/Local/UnrealEngine/Common/DerivedDataCache: Writable
[2020.01.25-03.12.44:622][  0]LogDerivedDataCache: Shared data cache path not found in *engine.ini, will not use an Shared cache.
[2020.01.25-03.12.44:622][  0]LogDerivedDataCache: Unable to find inner node Shared for hierarchical cache Hierarchy.
[2020.01.25-03.12.44:687][  0]LogMaterial: Verifying Global Shaders for PCD3D_SM5
[2020.01.25-03.12.44:693][  0]LogSlate: Using FreeType 2.10.0
[2020.01.25-03.12.44:694][  0]LogSlate: SlateFontServices - WITH_FREETYPE: 1, WITH_HARFBUZZ: 1
[2020.01.25-03.12.44:794][  0]LogAssetRegistry: FAssetRegistry took 0.0051 seconds to start up
[2020.01.25-03.12.45:524][  0]LogInit: Selected Device Profile: [Windows]
[2020.01.25-03.12.45:880][  0]LogMeshReduction: Using QuadricMeshReduction for automatic static mesh reduction
[2020.01.25-03.12.45:880][  0]LogMeshReduction: Using SimplygonMeshReduction for automatic skeletal mesh reduction
[2020.01.25-03.12.45:880][  0]LogMeshReduction: Using ProxyLODMeshReduction for automatic mesh merging
[2020.01.25-03.12.45:880][  0]LogMeshReduction: No distributed automatic mesh merging module available
[2020.01.25-03.12.45:880][  0]LogMeshMerging: No distributed automatic mesh merging module available
[2020.01.25-03.12.45:910][  0]LogNetVersion: ZombieHorde 1.0.0, NetCL: 10570792, EngineNetVer: 13, GameNetVer: 0 (Checksum: 2304190098)
[2020.01.25-03.12.48:207][  0]LogPackageLocalizationCache: Processed 10 localized package path(s) for 1 prioritized culture(s) in 0.200084 seconds
[2020.01.25-03.12.48:221][  0]LogUObjectArray: 46750 objects as part of root set at end of initial load.
[2020.01.25-03.12.48:221][  0]LogUObjectAllocator: 8137160 out of 0 bytes used by permanent object pool.
[2020.01.25-03.12.48:221][  0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
[2020.01.25-03.12.49:085][  0]LogTcpMessaging: Initializing TcpMessaging bridge
[2020.01.25-03.12.49:091][  0]LogUdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
[2020.01.25-03.12.51:608][  0]LogWindows: Error: === Critical error: ===
[2020.01.25-03.12.51:608][  0]LogWindows: Error: 
[2020.01.25-03.12.51:608][  0]LogWindows: Error: Fatal error!
[2020.01.25-03.12.51:608][  0]LogWindows: Error: 
[2020.01.25-03.12.51:608][  0]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
[2020.01.25-03.12.51:608][  0]LogWindows: Error: 
[2020.01.25-03.12.51:608][  0]LogWindows: Error: [Callstack] 0x00007ffee55123fc UE4Editor-ZombieHorde.dll!UnknownFunction []
[2020.01.25-03.12.51:608][  0]LogWindows: Error: [Callstack] 0x00007fff1075191a UE4Editor-CoreUObject.dll!UClass::CreateDefaultObject() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:3141]
[2020.01.25-03.12.51:608][  0]LogWindows: Error: [Callstack] 0x00007fff109e1e0f UE4Editor-CoreUObject.dll!UObjectLoadAllCompiledInDefaultProperties() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:933]
[2020.01.25-03.12.51:608][  0]LogWindows: Error: [Callstack] 0x00007fff109c11cf UE4Editor-CoreUObject.dll!ProcessNewlyLoadedUObjects() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:1022]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff108f5785 UE4Editor-CoreUObject.dll!TBaseStaticDelegateInstance<void __cdecl(FName,bool)>::ExecuteIfSafe() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:854]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff07d7c4c7 UE4Editor-Core.dll!TBaseMulticastDelegate<void,FName,bool>::Broadcast() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:1013]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff07d9aa5b UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:493]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff321baf37 UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [d:\build\++ue4\sync\engine\source\runtime\projects\private\moduledescriptor.cpp:554]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff321bb229 UE4Editor-Projects.dll!FProjectManager::LoadModulesForProject() [d:\build\++ue4\sync\engine\source\runtime\projects\private\projectmanager.cpp:63]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007ff7dd6ff671 UE4Editor.exe!FEngineLoop::LoadStartupModules() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3517]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007ff7dd70204b UE4Editor.exe!FEngineLoop::PreInitPostStartupScreen() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2889]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007ff7dd6fc17c UE4Editor.exe!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:131]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007ff7dd6fc4ca UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007ff7dd70ceae UE4Editor.exe!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:263]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007ff7dd70fcbe UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff653a7bd4 KERNEL32.DLL!UnknownFunction []
[2020.01.25-03.12.51:609][  0]LogWindows: Error: [Callstack] 0x00007fff6698ced1 ntdll.dll!UnknownFunction []
[2020.01.25-03.12.51:609][  0]LogWindows: Error: 
[2020.01.25-03.12.51:636][  0]LogExit: Executing StaticShutdownAfterError
[2020.01.25-03.12.51:640][  0]LogWindows: FPlatformMisc::RequestExit(1)
[2020.01.25-03.12.51:640][  0]LogCore: Engine exit requested (reason: Win RequestExit)
[2020.01.25-03.12.51:653][  0]Log file closed, 01/24/20 21:12:51

Edit

After performing the steps outlined in step 2 of @m_foda answer I get the below error. Which is weird because a normal build in VS passes without error.

1>------ Build started: Project: ZombieHorde, Configuration: DebugGame_Editor x64 ------
1>Using 'git status' to determine working set for adaptive non-unity build (F:\dev\projects\ue4\zombie-horde).
1>Creating makefile for ZombieHordeEditor (no existing makefile)
1>Parsing headers for ZombieHordeEditor
1>  Running UnrealHeaderTool "F:\dev\projects\ue4\zombie-horde\ZombieHorde.uproject" "F:\dev\projects\ue4\zombie-horde\Intermediate\Build\Win64\ZombieHordeEditor\DebugGame\ZombieHordeEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
1>Reflection code generated for ZombieHordeEditor in 17.2043766 seconds
1>Building ZombieHordeEditor...
1>Using Visual Studio 2019 14.24.28315 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314) and Windows 10.0.16299.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 31 actions with 4 processes...
1>  [1/31] Default.rc2
1>  [2/31] SharedPCH.Engine.NonOptimized.ShadowErrors.cpp
1>C:\dev\UnrealEngine\UE_4.24\Engine\Source\Runtime\Core\Public\Templates/Models.h(55): fatal error C1001: An internal error has occurred in the compiler.
1>  (compiler file 'msc1.cpp', line 1528)
1>   To work around this problem, try simplifying or changing the program near the locations listed above.
1>  Please choose the Technical Support command on the Visual C++
1>   Help menu, or open the Technical Support help file for more information
1>  INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64\cl.exe'
1>      Please choose the Technical Support command on the Visual C++
1>      Help menu, or open the Technical Support help file for more information
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command "C:\dev\UnrealEngine\UE_4.24\Engine\Build\BatchFiles\Build.bat ZombieHordeEditor Win64 DebugGame -Project="F:\dev\projects\ue4\zombie-horde\ZombieHorde.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "ZombieHorde.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I think this might be caused by a coding error in the last C++ modification you made before the editor crashed. And if the editor keeps crashing on startup then it’s likely that the bad code is in a class constructor, which gets called automatically when the editor starts up and loads your world/assets.

I can think of 2 ways to solve this:

1- If you remember what the last code modification was, you can comment it out and rebuild the project, as mentioned here

2- Otherwise, if you’re not sure what’s where the problem might be, you can try launching the editor from Visual Studio in DebugEditor mode, which will give you a stacktrace pointing to the offending code, as mentioned here

Hope that helps.

See my updated answer for the result of step 2.

1 Like

Did you manage to find the code that was causing the crash and try commenting it out before recompiling?

I’ve been compiling as I go without any issues until this last one. I’ve had the editor crash before while compiling. This is the only time it hasn’t reopened afterward. Still having issues opening it. I ran step 2 after I commented out a bunch of code. There isn’t much there yet as its a newer project.

Hmm that’s weird…

I noticed that your Windows SDK is 10.0.16299.0 and not that latest 10.0.18362.0. Maybe try updating that as I recall there are still some toolchain/SDK compatibility issues and VS2019 is not fully supported yet.

Alternatively, if the code is not much maybe you can create a new project and copy over your C++ classes one by one until you run into the issue so you can isolate the code that’s causing the crash.

Yes now that I think about it these problems didn’t start until I installed the last VS 2019 update. I’ll see if I can downgrade that and upgrade the Windows SDK.

So weird. I went to the VS installer and it said the only Windows SDK that was installed was the newest one. Which didn’t make sense because its obviously using an older version. So I checked Programs and Features in the Windows control panel and sure enough there are 5 different Windows SDK’s installed. I’m currently in progress of removing all but the most recent one to see if that fixes my issue.

Yeah that might work. I remember running into a similar issue in the past where UE4 was using an older SDK when compiling even though a newer version was available, and had to remove all but the newest version in the end to get it to work.

That didn’t work but I got it figured out. Editor is crashing while compiling this line
MovementComponent = GetOwner()->FindComponentByClass<UCharacterMovementComponent>();
But why would it crash here and not throw a compile error? I’m doing more digging now.

Ok so this is a weird one. The editor crashes when it tries to compile the line MovementComponent = GetOwner()->FindComponentByClass<UCharacterMovementComponent>();. However when I replace that with

    if (ensure(GetOwner()))
	{
		MovementComponent = GetOwner()->FindComponentByClass<UCharacterMovementComponent>();
	}

I get a ensure error in the editor. I’ve never seen a compiler detect if something is null. That’s a runtime thing. Any other place I use things that might be null it doesnt crash or give any kind of warning so I’m not sure what is going on here. I’ll have to figure out why GetOwner() is returning null and should be fine. But this definitely shouldnt be something that causes the editor to crash. Thanks to @m_fodda for pointing me in the right direction.

I’m assuming that this bit of code is called in your constructor, in which case it will actually get called by the editor (potentially several times) even without you entering play mode, which might be surprising and counterintuitive. However, it helps to realize that the editor is actually a running instance of UE4, so even though you’re simply compiling your new class it does actually get loaded into the engine’s “editor runtime context” (which is different from the game runtime context) and run there. This is normal behavior and is the reason why you see a lot of coded guarded with null checks in UE4, such as if (GEngine()->GetWorld()) and others, which ensures that the following bit of code is only run in the correct context you’re targeting (usually game context and not editor context).

So you can fix it by simply checking for null with if(GetOwner()) without the ensure bit. It’s also possible to move this initialization code to BeginPlay instead, which only gets run in the game context. More info here

Its still odd. I’ve never worked with a compiled language that kills your IDE instead of throwing compiler errors. A simple compiler error stating GetOwner is null and not letting compile complete until its fixed I think is a much better solution.

Thanks for this information. GetOwner is not null in BeginPlay so I moved this code there and its working as expected.

If this is the answer that helped resolve your question, then please mark it as such so others can find the correct answer easily. Thanks