Changing a Component's C++ File crashes the Editor (With a successful Compile)

Not sure if this should go in the Bug Report section or not.

In a medium-large scale project, I have a set of component files. Something I’ve found peculiar though is that there are two components which editing always crash the Engine. However, the crash is not at runtime - they work fine in-game- nor because of faulty data - they compile successfully- but rather at the end of the Engine’s compile process.

These crashes always occur whenever I modify some Enumerator classes declared in an external file as well as modify the mentioned components to update for the respective changes. If I then Reopen the Engine and recompile, the compile runs successfully saying that No Reloads are required (so their previous compile was indeed successful).

The main error is Assertion failed: InSCSNode->ComponentTemplate != NULL

Edit: from what google shows up when looking up the problem, I want to clarify some things:

  • It’s a default Actor Component
  • The Name of The Files has not been changed since their creation (nor its folder location)
  • Saved, Intermediate, VS, and Binaries folders clearing has already been tested (As well as sln file recompile)

Second Edit: I’ve furthered down the reasoning (or I think I have) and am currently concluding that it may be due to modifying information that is used in many places (for example, the mentioned enumerator / fstruct classes). The crashes happen when modifying their headers but it’s more of a gamble on whether the engine will crash on the compile or not; cpp files seem to compile just fine

I’m going to try to verify engine files. Also, full stack:

Assertion failed: InSCSNode->ComponentTemplate != NULL [File:D:\Build\++UE4\Sync\Engine\Source\Editor\Kismet\Private\SSCSEditor.cpp] [Line: 5780]

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:425]
UE4Editor_Kismet!SSCSEditor::AddTreeNode() [d:\build\++ue4\sync\engine\source\editor\kismet\private\sscseditor.cpp:5781]
UE4Editor_Kismet!SSCSEditor::UpdateTree() [d:\build\++ue4\sync\engine\source\editor\kismet\private\sscseditor.cpp:4521]
UE4Editor_Kismet!FBlueprintEditor::RefreshEditors() [d:\build\++ue4\sync\engine\source\editor\kismet\private\blueprinteditor.cpp:756]
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReplaceInstancesOfClass_Inner() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:2111]
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReplaceInstancesOfClass() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:1460]
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReinstanceInner() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:660]
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReinstanceObjects() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\kismet2\kismetreinstanceutilities.cpp:904]
UE4Editor_HotReload!FHotReloadModule::ReinstanceClass() [d:\build\++ue4\sync\engine\source\developer\hotreload\private\hotreload.cpp:1259]
UE4Editor_HotReload!FHotReloadModule::ReinstanceClasses() [d:\build\++ue4\sync\engine\source\developer\hotreload\private\hotreload.cpp:1242]
UE4Editor_HotReload!TBaseRawMethodDelegateInstance<0,FHotReloadModule,void __cdecl(void)>::ExecuteIfSafe() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:503]
UE4Editor_CoreUObject!UClassReplaceHotReloadClasses() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:746]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:872]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:788]
UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:510]
UE4Editor_Core!FModuleManager::LoadModule() [d:\build\++ue4\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:356]
UE4Editor_HotReload!FHotReloadModule::DoHotReloadInternal() [d:\build\++ue4\sync\engine\source\developer\hotreload\private\hotreload.cpp:784]
UE4Editor_HotReload!UE4Function_Private::TFunctionRefCaller<<lambda_9c48366a887b61ded2fa445a677e9fc1>,void __cdecl(TMap<FName,FString,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FName,FString,0> > const & __ptr64,bool,enum ECompilationResult::Type)>::Ca() [d:\build\++ue4\sync\engine\source\runtime\core\public\templates\function.h:252]
UE4Editor_HotReload!FHotReloadModule::CheckForFinishedModuleDLLCompile() [d:\build\++ue4\sync\engine\source\developer\hotreload\private\hotreload.cpp:1870]
UE4Editor_HotReload!FHotReloadModule::Tick() [d:\build\++ue4\sync\engine\source\developer\hotreload\private\hotreload.cpp:1416]
UE4Editor_Core!FTicker::Tick() [d:\build\++ue4\sync\engine\source\runtime\core\private\containers\ticker.cpp:98]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3669]
UE4Editor!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
UE4Editor!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
kernel32
ntdll

It’s sounds like a bug.

It doesn’t matter if it compiles, it a run time error, since compiler can’t detect if you programming correctly, it can only detect if you make writing errors but you code can be bad either way.

Does this happen on hot reload? did you try to compile it without editor open (without hot reload)? hot reload requires module reload which not all code in engine is prepared for and may cause issues and oyu have that then you can consider this a hot reload bug. But if this is crashes even without hot reload then it might be error in your code.

I verified the Engine files. HotReloads are registering successfully so far after a successful compile.

I would never trust hot-reload with a production project.