Description

If two custom classes are created in C++ (Class A & B) and a reference to Class A is created as a member of Class B and initialized in Class B's constructor, the editor will crash once a blueprint of made of Class B

Note: This only occurs in 4.11 Preview 7 and in later changelists in the Releases branch. This issue does not occur in 4.12 (Main)

Regression?: Yes
Occurs: 2896623 (4.11 Preview 7)
Does not occur: 2872498 (4.10.4)
Have not tested earlier versions of the previews. If requested, can test earlier versions to narrow down the issue.
Not a regression

Steps to Reproduce
  1. Create a new C++ project
  2. Add two new C++ classes, one based on Actor named MyActor and the other based on Character named MyCharacter (It doesn't necessarily need to be these types, just for consistency)
  3. In MyCharacter.h, add the following code at line #4:
     #include "MyActor.h" 
  4. In MyCharacter.h, add the following code at line #27 (Under the declaration for SetupPlayerInputComponent)
     AMyActor* TheActor; 
  5. In MyCharacter.cpp, add the following code at line #12:
     TheActor = CreateDefaultSubobject<AMyActor>(TEXT("TheActor")); 
  6. Compile the project and return to the editor
  7. Create a blueprint based off MyCharacter
    Result: The editor crashes with the callstack below
    Expected: The blueprint should be created without an issue
Callstack
 Fatal error: [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\CoreUObject\Private\Templates\Casts.cpp] [Line: 11] 
Cast of MyCharacter /Script/TestingDetach.Default__MyCharacter to Level failed


UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\core\private\misc\outputdevice.cpp:430]
UE4Editor_CoreUObject!CastLogError() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\coreuobject\private\templates\casts.cpp:12]
UE4Editor_Engine!CastChecked<ULevel,UObject>() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\coreuobject\public\templates\casts.h:195]
UE4Editor_Engine!TActorIteratorBase<FActorIterator>::operator++() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\engine\public\engineutils.h:253]
UE4Editor_Engine!UWorld::UpdateCullDistanceVolumes() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\engine\private\world.cpp:1390]
UE4Editor_Engine!UWorld::InitializeNewWorld() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\engine\private\world.cpp:1103]
UE4Editor_Engine!FPreviewScene::FPreviewScene() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\engine\private\previewscene.cpp:35]
UE4Editor_UnrealEd!FThumbnailPreviewScene::FThumbnailPreviewScene() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\thumbnailhelpers.cpp:28]
UE4Editor_UnrealEd!FClassActorThumbnailScene::FClassActorThumbnailScene() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\thumbnailhelpers.cpp:969]
UE4Editor_UnrealEd!FBlueprintThumbnailScene::FBlueprintThumbnailScene() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\thumbnailhelpers.cpp:1138]
UE4Editor_UnrealEd!UBlueprintThumbnailRenderer::CanVisualizeAsset() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\thumbnailrendering\blueprintthumbnailrenderer.cpp:22]
UE4Editor_UnrealEd!UThumbnailManager::GetRenderingInfo() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\thumbnailmanager.cpp:141]
UE4Editor_UnrealEd!FAssetThumbnailPool::Tick() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\assetthumbnail.cpp:944]
UE4Editor_UnrealEd!FTickableEditorObject::TickObjects() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\public\tickableeditorobject.h:15]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\editorengine.cpp:1123]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\editor\unrealed\private\unrealedengine.cpp:370]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\launch\private\launchengineloop.cpp:2640]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++ue4+release-4.11\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

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-28545 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.11
Target Fix4.12
Fix Commit2937852
Main Commit3117035
CreatedMar 18, 2016
ResolvedAug 29, 2016
UpdatedApr 27, 2018
View Jira Issue