Description

Crash occurs when removing the native root component from code and then attempting to reopen a Blueprint Class asset that was based on the native parent class.

Seems like maybe the 'AttachParent' field isn't cleared out if/when the component it references that was previously serialized out no longer exists in the default constructed object.

Steps to Reproduce

1) Launch QAGame editor.
2) Choose "Create a new C++ Class" and base it on Actor (call it MyActor).
3) Edit MyActor.h to add both a USceneComponent and UStaticMeshComponent.
4) In the MyActor.cpp file, in the Constructor, add a couple lines to CreateDefaultSubobject() for both components.
5) Set the RootComponent = SceneComponent and attach the MeshComponent to the SceneComponent (also in the C++ constructor).
6) Compile (in Visual Studio).
7) Back in the editor, create a new BP class of type MyActor. Compile and save.
8) Close the editor.
9) In Visual Studio, delete the SceneComponent and reassign the RootComponent to the MeshComponent.
10) Relaunch the editor and attempt to open the saved BP class. Note that it will crash.

Callstack

UE4Editor-Kismet-Win64-Debug.dll!SSCSEditor::AddTreeNodeFromComponent(USceneComponent * InSceneComponent) Line 5319 C++
UE4Editor-Kismet-Win64-Debug.dll!SSCSEditor::AddTreeNodeFromComponent(USceneComponent * InSceneComponent) Line 5336 C++
> UE4Editor-Kismet-Win64-Debug.dll!SSCSEditor::UpdateTree(bool bRegenerateTreeNodes) Line 4255 C++
UE4Editor-Kismet-Win64-Debug.dll!SSCSEditor::Construct(const SSCSEditor::FArguments & InArgs) Line 3492 C++
UE4Editor-Kismet-Win64-Debug.dll!RequiredArgs::T0RequiredArgs::CallConstruct<SSCSEditor>(const TSharedRef<SSCSEditor,0> & OnWidget, const SSCSEditor::FArguments & WithNamedArgs) Line 1075 C++
UE4Editor-Kismet-Win64-Debug.dll!TDecl<SSCSEditor,RequiredArgs::T0RequiredArgs>::operator<<=(const SSCSEditor::FArguments & InArgs) Line 1332 C++
UE4Editor-Kismet-Win64-Debug.dll!FBlueprintEditor::CreateSCSEditors() Line 2171 C++
UE4Editor-Kismet-Win64-Debug.dll!FBlueprintEditor::CreateDefaultTabContents(const TArray<UBlueprint *,FDefaultAllocator> & InBlueprints) Line 2160 C++
UE4Editor-Kismet-Win64-Debug.dll!FBlueprintEditor::CommonInitialization(const TArray<UBlueprint *,FDefaultAllocator> & InitBlueprints) Line 1459 C++
UE4Editor-Kismet-Win64-Debug.dll!FBlueprintEditor::InitBlueprintEditor(const EToolkitMode::Type Mode, const TSharedPtr<IToolkitHost,0> & InitToolkitHost, const TArray<UBlueprint *,FDefaultAllocator> & InBlueprints, bool bShouldOpenInDefaultsMode) Line 1575 C++
UE4Editor-Kismet-Win64-Debug.dll!FBlueprintEditorModule::CreateBlueprintEditor(const EToolkitMode::Type Mode, const TSharedPtr<IToolkitHost,0> & InitToolkitHost, UBlueprint * Blueprint, bool bShouldOpenInDefaultsMode) Line 156 C++
UE4Editor-AssetTools-Win64-Debug.dll!FAssetTypeActions_Blueprint::OpenAssetEditor(const TArray<UObject *,FDefaultAllocator> & InObjects, TSharedPtr<IToolkitHost,0> EditWithinLevelEditor) Line 78 C++
UE4Editor-UnrealEd-Win64-Debug.dll!FAssetEditorManager::OpenEditorForAsset(UObject * Asset, const EToolkitMode::Type ToolkitMode, TSharedPtr<IToolkitHost,0> OpenedFromLevelEditor) Line 303 C++
UE4Editor-AssetTools-Win64-Debug.dll!FAssetTypeActions_Base::AssetsActivated(const TArray<UObject *,FDefaultAllocator> & InObjects, EAssetTypeActivationMethod::Type ActivationType) Line 37 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!SContentBrowser::OnAssetsActivated(const TArray<FAssetData,FDefaultAllocator> & ActivatedAssets, EAssetTypeActivationMethod::Type ActivationMethod) Line 1765 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,TTypeWrapper<void> __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::Execute(const TArray<FAssetData,FDefaultAllocator> & <Params_0>, EAssetTypeActivationMethod::Type <Params_1>) Line 282 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,void __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::ExecuteIfSafe(const TArray<FAssetData,FDefaultAllocator> & <Params_0>, EAssetTypeActivationMethod::Type <Params_1>) Line 390 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!SAssetView::OnListMouseButtonDoubleClick(TSharedPtr<FAssetViewItem,0> AssetItem) Line 3284 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!TMemberFunctionCaller<SAssetView,void (__cdecl SAssetView::*)(TSharedPtr<FAssetViewItem,0>) __ptr64>::operator()<TSharedPtr<FAssetViewItem,0> & __ptr64>(TSharedPtr<FAssetViewItem,0> & <Args_0>) Line 162 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper<void> __cdecl(TSharedPtr<FAssetViewItem,0>)>::Execute(TSharedPtr<FAssetViewItem,0> <Params_0>) Line 282 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0>)>::ExecuteIfSafe(TSharedPtr<FAssetViewItem,0> <Params_0>) Line 390 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!TBaseDelegate<void,TSharedPtr<FAssetViewItem,0> >::ExecuteIfBound(TSharedPtr<FAssetViewItem,0> <Params_0>) Line 482 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!SListView<TSharedPtr<FAssetViewItem,0> >::Private_OnItemDoubleClicked(TSharedPtr<FAssetViewItem,0> TheItem) Line 689 C++
UE4Editor-ContentBrowser-Win64-Debug.dll!STableRow<TSharedPtr<FAssetViewItem,0> >::OnMouseButtonDoubleClick(const FGeometry & InMyGeometry, const FPointerEvent & InMouseEvent) Line 260 C++
UE4Editor-Slate-Win64-Debug.dll!<lambda_3d98884fcb04396047c2c56b16b3a137>::operator()(const FArrangedWidget & TargetWidget, const FPointerEvent & Event) Line 4592 C++
UE4Editor-Slate-Win64-Debug.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_3d98884fcb04396047c2c56b16b3a137> >(FSlateApplication * ThisApplication, FEventRouter::FBubblePolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::ProcessMouseButtonDoubleClickEvent::__l3::<lambda_3d98884fcb04396047c2c56b16b3a137> & Lambda) Line 214 C++
UE4Editor-Slate-Win64-Debug.dll!FSlateApplication::ProcessMouseButtonDoubleClickEvent(const TSharedPtr<FGenericWindow,0> & PlatformWindow, FPointerEvent & InMouseEvent) Line 4593 C++
UE4Editor-Slate-Win64-Debug.dll!FSlateApplication::OnMouseDoubleClick(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const EMouseButtons::Type Button) Line 4573 C++
UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1345 C++
UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 1708 C++
UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 764 C++
UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 627 C++
user32.dll!00007ffd44ca250d() Unknown
user32.dll!00007ffd44ca2367() Unknown
UE4Editor-Core-Win64-Debug.dll!WinPumpMessages() Line 770 C++
UE4Editor-Core-Win64-Debug.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Line 797 C++
UE4Editor-Win64-Debug.exe!FEngineLoop::Tick() Line 2378 C++
UE4Editor-Win64-Debug.exe!EngineTick() Line 52 C++
UE4Editor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 145 C++
UE4Editor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 189 C++
UE4Editor-Win64-Debug.exe!__tmainCRTStartup() Line 618 C

Have Comments or More Details?

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

0
Login to Vote

Fixed
Fix Commit2766160
Main Commit2781495
CreatedJul 27, 2015
ResolvedNov 13, 2015
UpdatedApr 27, 2018