Description

Looks like this is a problem where the Actor is Duplicated due to constructions scripts running. Later, when the duplicate is destroyed all of its components will call RemoveOwnedComponent as they're being destroyed, which subsequently causes the package to be dirtied.

Steps to Reproduce
  1. Create a new BP derived from StaticMeshActor (ChildActorBP).
  2. Create a new BP derived from Actor (OwnerBP).
  3. Add a ChildActorComponent to the second BP (OwnerBP).
  4. Set the ChildActorComponent ChildActor class to the first BP (ChildActorBP).
  5. Recompile the second BP (OwnerBP).

Expected: No changes will occur in ChildActorBP.
Actual: ChildActorBP is marked dirty.

Callstack
>	UE4Editor-CoreUObject.dll!UPackage::SetDirtyFlag(bool bIsDirty) Line 77	C++
 	UE4Editor-CoreUObject.dll!UObjectBaseUtility::MarkPackageDirty() Line 165	C++
 	UE4Editor-CoreUObject.dll!UObject::Modify(bool bAlwaysMarkDirty) Line 1078	C++
 	UE4Editor-Engine.dll!AActor::Modify(bool bAlwaysMarkDirty) Line 1083	C++
 	UE4Editor-Engine.dll!AActor::RemoveOwnedComponent(UActorComponent * Component) Line 2494	C++
 	UE4Editor-Engine.dll!UActorComponent::BeginDestroy() Line 454	C++
 	UE4Editor-Engine.dll!UPrimitiveComponent::BeginDestroy() Line 1020	C++
 	UE4Editor-Engine.dll!UStaticMeshComponent::BeginDestroy() Line 1379	C++
 	UE4Editor-CoreUObject.dll!UObject::ConditionalBeginDestroy() Line 878	C++
 	UE4Editor-CoreUObject.dll!StaticAllocateObject(UClass * InClass, UObject * InOuter, FName InName, EObjectFlags InFlags, EInternalObjectFlags InternalSetFlags, bool bCanRecycleSubobjects, bool * bOutRecycledSubobject) Line 2473	C++
 	UE4Editor-CoreUObject.dll!StaticConstructObject_Internal(UClass * InClass, UObject * InOuter, FName InName, EObjectFlags InFlags, EInternalObjectFlags InternalSetFlags, UObject * InTemplate, bool bCopyTransientsFromClassDefaults, FObjectInstancingGraph * InInstanceGraph, bool bAssumeTemplateIsArchetype) Line 3297	C++
 	UE4Editor-CoreUObject.dll!FDuplicateDataWriter::GetDuplicatedObject(UObject * Object, bool bCreateIfMissing) Line 161	C++
 	UE4Editor-CoreUObject.dll!FDuplicateDataWriter::operator<<(UObject * & Object) Line 67	C++
 	UE4Editor-CoreUObject.dll!UObjectProperty::SerializeItem(FArchive & Ar, void * Value, const void * Defaults) Line 56	C++
 	UE4Editor-CoreUObject.dll!FPropertyTag::SerializeTaggedProperty(FArchive & Ar, UProperty * Property, unsigned char * Value, unsigned char * Defaults) Line 185	C++
 	UE4Editor-CoreUObject.dll!UStruct::SerializeTaggedProperties(FArchive & Ar, unsigned char * Data, UStruct * DefaultsStruct, unsigned char * Defaults, const UObject * BreakRecursionIfFullyLoad) Line 1150	C++
 	UE4Editor-CoreUObject.dll!UObject::SerializeScriptProperties(FArchive & Ar) Line 1239	C++
 	UE4Editor-CoreUObject.dll!UObject::Serialize(FArchive & Ar) Line 1173	C++
 	UE4Editor-Engine.dll!AStaticMeshActor::Serialize(FArchive & Ar) Line 140	C++
 	UE4Editor-CoreUObject.dll!StaticDuplicateObjectEx(FObjectDuplicationParameters & Parameters) Line 2126	C++
 	UE4Editor-CoreUObject.dll!StaticDuplicateObject(const UObject * SourceObject, UObject * DestOuter, const FName DestName, EObjectFlags FlagMask, UClass * DestClass, EDuplicateMode::Type DuplicateMode, EInternalObjectFlags InternalFlagsMask) Line 2032	C++
 	UE4Editor-Engine.dll!AActor::CreateComponentFromTemplate(UActorComponent * Template, const FName InName) Line 902	C++
 	UE4Editor-Engine.dll!USCS_Node::ExecuteNodeOnActor(AActor * Actor, USceneComponent * ParentComponent, const FTransform * RootTransform, bool bIsDefaultTransform) Line 97	C++
 	UE4Editor-Engine.dll!USCS_Node::ExecuteNodeOnActor(AActor * Actor, USceneComponent * ParentComponent, const FTransform * RootTransform, bool bIsDefaultTransform) Line 181	C++
 	UE4Editor-Engine.dll!USimpleConstructionScript::ExecuteScriptOnActor(AActor * Actor, const TInlineComponentArray<USceneComponent *,24> & NativeSceneComponents, const FTransform & RootTransform, bool bIsDefaultTransform) Line 650	C++
 	UE4Editor-Engine.dll!AActor::ExecuteConstruction(const FTransform & Transform, const FComponentInstanceDataCache * InstanceDataCache, bool bIsDefaultTransform) Line 718	C++
 	UE4Editor-Engine.dll!AActor::RerunConstructionScripts() Line 491	C++
 	UE4Editor-UnrealEd.dll!FReinstanceFinalizer::Finalize() Line 536	C++
 	UE4Editor-UnrealEd.dll!FBlueprintCompileReinstancer::ReinstanceObjects(bool bForceAlwaysReinstance) Line 953	C++
 	UE4Editor-UnrealEd.dll!FKismetEditorUtilities::CompileBlueprint(UBlueprint * BlueprintObj, EBlueprintCompileOptions CompileFlags, FCompilerResultsLog * pResults) Line 889	C++
 	UE4Editor-Kismet.dll!FBlueprintEditor::Compile() Line 3292	C++
 	UE4Editor-Kismet.dll!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,TTypeWrapper<void> __cdecl(void)>::Execute() Line 327	C++
 	UE4Editor-Kismet.dll!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,void __cdecl(void)>::ExecuteIfSafe() Line 433	C++
 	UE4Editor-Slate.dll!FUICommandList::ExecuteAction(const TSharedRef<FUICommandInfo const ,0> InUICommandInfo) Line 97	C++
 	UE4Editor-Slate.dll!SToolBarButtonBlock::OnClicked() Line 305	C++
 	UE4Editor-Slate.dll!TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void) __ptr64>::operator()<>() Line 165	C++
 	UE4Editor-Slate.dll!UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int> >::ApplyAfter<TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void) __ptr64> >(TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void)> && Func) Line 504	C++
 	UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,FReply __cdecl(void)>::Execute() Line 327	C++
 	UE4Editor-Slate.dll!TBaseDelegate<FReply>::Execute() Line 537	C++
 	UE4Editor-Slate.dll!SButton::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 278	C++
 	UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent::__l14::<lambda>(const FArrangedWidget & TargetWidget, const FPointerEvent & Event) Line 5036	C++
 	UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,FReply <lambda>(const FArrangedWidget &, const FPointerEvent &) >(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::__l14::FReply <lambda>(const FArrangedWidget &, const FPointerEvent &) & Lambda) Line 239	C++
 	UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent(FWidgetPath & WidgetsUnderPointer, FPointerEvent & PointerEvent) Line 5025	C++
 	UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(FPointerEvent & MouseEvent) Line 5503	C++
 	UE4Editor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button, const FVector2D CursorPos) Line 5483	C++
 	UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1698	C++
 	UE4Editor-Core.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 2120	C++
 	UE4Editor-Core.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 867	C++
 	UE4Editor-Core.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 714	C++
 	[External Code]	
 	UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Line 980	C++
 	UE4Editor.exe!FEngineLoop::Tick() Line 3020	C++
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 166	C++
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 199	C++
 	[External Code]	

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-43328 in the post.

2
Login to Vote

Fixed
ComponentGameplay - Components
Target Fix4.18
Fix Commit3603249
Main Commit3380073
Release Commit3643070
CreatedMar 24, 2017
ResolvedAug 22, 2017
UpdatedSep 26, 2017