Description

A crash occurs when copy and paste the ChildActorComponent, only if the template actor has a DefaultSubObject. There is no crash in the case of using Actor (eg. AActor) without a DefaultSubObject as a template. "Duplicate" does not crash.

The crash is in FObjectInstancingGraph::GetInstancedSubobject() and SubobjectOuter is nullptr. This was not set for Object in both GetDestinationObject () and GetInstancedSubobject ().

Steps to Reproduce
  1. Create blueprint actor.
  2. Open actor blueprint and open Viewport tab.
  3. Add a Child Actor Component.
  4. Set the "PointLight" of Child Actor Class.
  5. Compiling blueprint.
  6. Copy and paste a Child Actor Component (generated Step3) 

          At that time, occur editor crash.

 

Callstack

UE4Editor-CoreUObject.dll!FObjectInstancingGraph::GetInstancedSubobject(UObject * SourceSubobject, UObject * CurrentValue, UObject * CurrentObject, bool bDoNotCreateNewInstance, bool bAllowSelfReference) Line 206 C++
UE4Editor-CoreUObject.dll!FObjectInstancingGraph::InstancePropertyValue(UObject * ComponentTemplate, UObject * CurrentValue, UObject * Owner, bool bIsTransient, bool bCausesInstancing, bool bAllowSelfReference) Line 294 C++
UE4Editor-CoreUObject.dll!UObjectPropertyBase::InstanceSubobjects(void * Data, const void * DefaultData, UObject * Owner, FObjectInstancingGraph * InstanceGraph) Line 37 C++
UE4Editor-CoreUObject.dll!UStruct::InstanceSubobjectTemplates(void * Data, const void * DefaultData, UStruct * DefaultStruct, UObject * Owner, FObjectInstancingGraph * InstanceGraph) Line 1564 C++
UE4Editor-UnrealEd.dll!ImportObjectProperties(FImportObjectParams & InParams) Line 732 C++
UE4Editor-UnrealEd.dll!ImportObjectProperties(unsigned char * DestData, const wchar_t * SourceText, UStruct * ObjectStruct, UObject * SubobjectRoot, UObject * SubobjectOuter, FFeedbackContext * Warn, int Depth, int LineNumber, FObjectInstancingGraph * InInstanceGraph, const TMap<AActor *,AActor *,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<AActor *,AActor *,0> > * ActorRemapper) Line 815 C++
UE4Editor-UnrealEd.dll!ImportProperties(unsigned char * DestData, const wchar_t * SourceText, UStruct * ObjectStruct, UObject * SubobjectRoot, UObject * SubobjectOuter, FFeedbackContext * Warn, int Depth, FObjectInstancingGraph & InstanceGraph, const TMap<AActor *,AActor *,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<AActor *,AActor *,0> > * ActorRemapper) Line 589 C++
UE4Editor-UnrealEd.dll!ImportObjectProperties(FImportObjectParams & InParams) Line 707 C++
UE4Editor-UnrealEd.dll!ImportObjectProperties(unsigned char * DestData, const wchar_t * SourceText, UStruct * ObjectStruct, UObject * SubobjectRoot, UObject * SubobjectOuter, FFeedbackContext * Warn, int Depth, int LineNumber, FObjectInstancingGraph * InInstanceGraph, const TMap<AActor *,AActor *,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<AActor *,AActor *,0> > * ActorRemapper) Line 815 C++
UE4Editor-UnrealEd.dll!FCustomizableTextObjectFactory::ProcessBuffer(UObject * InParent, EObjectFlags Flags, const wchar_t * Buffer) Line 4966 C++
UE4Editor-UnrealEd.dll!FComponentObjectTextFactory::Get(const FString & InTextBuffer, bool bPasteAsArchetypes) Line 85 C++
UE4Editor-UnrealEd.dll!FComponentEditorUtils::CanPasteComponents(USceneComponent * RootComponent, bool bOverrideCanAttach, bool bPasteAsArchetypes) Line 406 C++
UE4Editor-Kismet.dll!SSCSEditor::CanPasteNodes() Line 5433 C++
[Inline Frame] UE4Editor-Kismet.dll!TMemberFunctionCaller<SSCSEditor,bool (__cdecl SSCSEditor::*)(void)const >::operator()() Line 156 C++
[Inline Frame] UE4Editor-Kismet.dll!UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int> >::ApplyAfter(TMemberFunctionCaller<SSCSEditor,bool (__cdecl SSCSEditor::*)(void)const > &&) Line 498 C++
UE4Editor-Kismet.dll!TBaseSPMethodDelegateInstance<1,SSCSEditor,0,bool __cdecl(void)>::Execute() Line 279 C++
UE4Editor-Slate.dll!FUICommandList::ConditionalProcessCommandBindings(const FKey Key, bool bCtrl, bool bAlt, bool bShift, bool bCmd, bool bRepeat) Line 213 C++
UE4Editor-Slate.dll!FUICommandList::ProcessCommandBindings(const FKeyEvent & InKeyEvent) Line 160 C++
UE4Editor-Kismet.dll!SSCSEditor::OnKeyDown(const FGeometry & MyGeometry, const FKeyEvent & InKeyEvent) Line 3791 C++
[Inline Frame] UE4Editor-Slate.dll!FSlateApplication::ProcessKeyDownEvent::__l31::<lambda_2afcd964c763e269e2d1a63f3a72f846>::operator()(const FArrangedWidget &) Line 5099 C++
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FKeyEvent,<lambda_2afcd964c763e269e2d1a63f3a72f846> >(FSlateApplication * ThisApplication, FEventRouter::FBubblePolicy RoutingPolicy, FKeyEvent EventCopy, const FSlateApplication::ProcessKeyDownEvent::__l31::<lambda_2afcd964c763e269e2d1a63f3a72f846> & Lambda) Line 270 C++
[Inline Frame] UE4Editor-Slate.dll!FEventRouter::RouteAlongFocusPath(FSlateApplication *) Line 251 C++
UE4Editor-Slate.dll!FSlateApplication::ProcessKeyDownEvent(FKeyEvent & InKeyEvent) Line 5097 C++
UE4Editor-Slate.dll!FSlateApplication::OnKeyDown(const int KeyCode, const unsigned int CharacterCode, const bool IsRepeat) Line 5009 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1666 C++
UE4Editor-ApplicationCore.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 2281 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1511 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 766 C++
[External Code]
[Inline Frame] UE4Editor-ApplicationCore.dll!WinPumpMessages() Line 107 C++
UE4Editor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) Line 130 C++
UE4Editor.exe!FEngineLoop::Tick() Line 3615 C++
[Inline Frame] UE4Editor.exe!EngineTick() Line 62 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 174 C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 262 C++
[External Code]

Have Comments or More Details?

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

6
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.204.21
Target Fix4.22.3
Fix Commit6867466
Main Commit6867466
CreatedNov 14, 2018
ResolvedJun 6, 2019
UpdatedFeb 5, 2020