Developer Notes

By design as the game itself crashes instead of the editor (tested by running in standalone), FObjectFinder shouldn't be used outside of the Constructor

Description

If FObjectFinder is used in a function other than the constructor, which should not be done, it causes a crash.

Steps to Reproduce

1. Create a new project, C++ based off the Third Person template
2. Create a new C++ class
3. In the .cpp file, below Super::BeginPlay(); (line 18) enter the following code:
static ConstructorHelpers::FObjectFinder<UStaticMesh> GameObjectLookupDataTable_BP(TEXT("DataTable'/Game/ThirdPerson/GameObjectLookupTable.GameObjectLookupTable'"));
4. Compile the project (ctrl+shift+b)
5. Return to the editor and create a new blueprint based off your C++ class
6. Place an instance of the new blueprint in the scene
7. Hit play
8. Notice that the editor locks up and crashes

Callstack

MachineId:CBED442E4F2EE6B2A9D9BC8E57AE98C0
EpicAccountId:fb97c75d3c2041ad93ce1ee90d0703d7

Unknown exception - code 00000001 (first/second chance not available)

"Fatal error: [File[Image Removed]:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjec

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:360]
UE4Editor_CoreUObject!ConstructorHelpers::CheckIfIsInConstructor() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2552]
UE4Editor_MyProject2
UE4Editor_MyProject2
UE4Editor_Engine!AWorldSettings::NotifyBeginPlay() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\worldsettings.cpp:124]
UE4Editor_Engine!AGameMode::HandleMatchHasStarted() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\gamemode.cpp:611]
UE4Editor_Engine!AGameMode::SetMatchState() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\gamemode.cpp:730]
UE4Editor_Engine!AGameMode::StartMatch() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\gamemode.cpp:588]
UE4Editor_Engine!UWorld::BeginPlay() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\world.cpp:3041]
UE4Editor_Engine!UGameInstance::StartPIEGameInstance() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\gameinstance.cpp:269]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\playlevel.cpp:2919]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\playlevel.cpp:2266]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\playlevel.cpp:983]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\editorengine.cpp:1236]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\unrealedengine.cpp:366]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:2355]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:142]
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:295]

Have Comments or More Details?

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

0
Login to Vote

By Design
ComponentUE - Foundation - Core
Affects Versions4.8
Target Fix4.8
CreatedMay 19, 2015
ResolvedMay 21, 2015
UpdatedFeb 5, 2017
View Jira Issue