Description

After creating a Scene Component code class and an Actor code class, creating a reference to the SceneComponent in the Actor class constructor will cause a crash on hot reload in the editor.

Steps to Reproduce

1. Open UE4 Editor (any new project)
2. Add code to project based on SceneComponent (MySceneComponent)
3. Add code to project based on Actor (MyActor)
4. In MyActor.h make the following changes:
a. add include for MySceneComponent.h
b. add UPROPERTY() UMySceneComponent* SceneRef;
c. add "const FObjectInitializer& ObjInit" to constructor declaration
6. In MyActor.cpp make the following changes:
a. add "const FObjectInitializer& ObjInit): Super(ObjInit)" to constructor definition
b. add "SceneRef= ObjInit.CreateDefaultSubobject<UMySceneComponent>(this, "SceneRef");" inside constructor
7. Hit compile button in the editor
8. In MyScene.h add ShortTooltip = "crash" inside the meta=() section of UCLASS()
9. Hit compile button in the editor

Callstack
Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1639] 
Object is not packaged: None None


KERNELBASE.dll!UnknownFunction (0x000007fefd73940d) + 0 bytes [UnknownFile:0]
UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() (0x000007fedb4b8004) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor-Core.dll!FMsg::Logf__VA() (0x000007fedb3376df) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:526]
UE4Editor-CoreUObject.dll!StaticAllocateObjectErrorTests() (0x000007fedc40d52d) + 179 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1639]
UE4Editor-CoreUObject.dll!StaticAllocateObject() (0x000007fedc40c5a5) + 40 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1688]
UE4Editor-CoreUObject.dll!UClass::CreateDefaultObject() (0x000007fedc2acbdf) + 55 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:2502]
UE4Editor-CoreUObject.dll!FObjectInitializer::CreateDefaultSubobject() (0x000007fedc3f3cf9) + 22 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2644]
UE4Editor-HotReloadCrash-1268.dll!AMyActor::AMyActor() (0x000007fec7c03c75) + 114 bytes [c:\users\doug.wilson\documents\unreal projects\hotreloadcrash\source\hotreloadcrash\myactor.cpp:12]
UE4Editor-CoreUObject.dll!StaticConstructObject() (0x000007fedc40dd04) + 122 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2232]
UE4Editor-CoreUObject.dll!UClass::HotReloadPrivateStaticClass() (0x000007fedc2ced4d) + 59 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:3368]
UE4Editor-HotReloadCrash-1268.dll!GetPrivateStaticClassBody<AMyActor>() (0x000007fec7c046dc) + 86 bytes [d:\epic games\4.7\engine\source\runtime\coreuobject\public\uobject\class.h:2279]
UE4Editor-HotReloadCrash-1268.dll!TClassCompiledInDefer<AMyActor>::Register() (0x000007fec7c04f41) + 45 bytes [d:\epic games\4.7\engine\source\runtime\coreuobject\public\uobject\uobjectbase.h:295]
UE4Editor-CoreUObject.dll!UClassRegisterAllCompiledInClasses() (0x000007fedc4120d0) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:690]
UE4Editor-CoreUObject.dll!ProcessNewlyLoadedUObjects() (0x000007fedc40433b) + 5 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:808]
UE4Editor-CoreUObject.dll!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() (0x000007fedc2b3c97) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor-Core.dll!TBaseMulticastDelegate<void>::Broadcast() (0x000007fedb216fb5) + 11 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1030]
UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() (0x000007fedb3c31a2) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\modules\modulemanager.cpp:359]
UE4Editor-Core.dll!FModuleManager::LoadModule() (0x000007fedb3c2798) + 50 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\modules\modulemanager.cpp:238]
UE4Editor-HotReload.dll!FHotReloadModule::DoHotReloadInternal() (0x000007fecc2249f8) + 44 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:654]
UE4Editor-HotReload.dll!FHotReloadModule::DoHotReloadCallback() (0x000007fecc223c6d) + 77 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:620]
UE4Editor-HotReload.dll!TBaseRawMethodDelegateInstance<0,FHotReloadModule,TTypeWrapper<void> __cdecl(bool,enum ECompilationResult::Type),TArray<UPackage * __ptr64,FDefaultAllocator>,TArray<FName,FDefaultAllocator>,FOutputDevice & __ptr64>::Execute() (0x000007fecc226547) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:492]
UE4Editor-HotReload.dll!TBaseRawMethodDelegateInstance<0,FHotReloadModule,void __cdecl(bool,enum ECompilationResult::Type),TArray<UPackage * __ptr64,FDefaultAllocator>,TArray<FName,FDefaultAllocator>,FOutputDevice & __ptr64>::ExecuteIfSafe() (0x000007fecc2266b9) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:582]
UE4Editor-HotReload.dll!FHotReloadModule::CheckForFinishedModuleDLLCompile() (0x000007fecc222848) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:1473]
UE4Editor-HotReload.dll!FHotReloadModule::Tick() (0x000007fecc232bda) + 32 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:433]
UE4Editor-UnrealEd.dll!UEditorEngine::Tick() (0x000007fecfa6d1be) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editor.cpp:946]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() (0x000007fecff28196) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\unrealedengine.cpp:347]
UE4Editor.exe!FEngineLoop::Tick() (0x000000013f760263) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:2257]
UE4Editor.exe!GuardedMain() (0x000000013f75267c) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() (0x000000013f7526ea) + 5 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() (0x000000013f762219) + 17 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor.exe!__tmainCRTStartup() (0x000000013f763159) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
kernel32.dll!UnknownFunction (0x00000000776859ed) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x00000000778bc541) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x00000000778bc541) + 0 bytes [UnknownFile:0]

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.7
Target Fix4.8
Fix Commit2548633
Release Commit2549544
CreatedFeb 19, 2015
ResolvedMar 2, 2015
UpdatedFeb 5, 2017
View Jira Issue