Description

If an actor contains a custom SceneComponent that creates another component that is tagged with Transient and DuplicateTransient, deleting/un-deleting/deleting the actor again will cause the editor to crash.

This also causes the project to reach 95% when loading and then produce the same callstack.

Workaround:
Crash only seems to occur if the component that is declared in the custom scene component is marked as Transient and DuplicateTransient in its UPROPERTY macro.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add class to project based on SceneComponent (MySceneComponent)
  3. Add the following to MySceneComponent.h
    	UPROPERTY(Transient, DuplicateTransient)
    	UStaticMeshComponent* MeshComponent;
    
  4. In MySceneComponent.cpp add the following to the constructor:
    TheMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("TheMeshComponent"));
    
  5. Compile
  6. In the editor, create a blueprint based on actor (MyActorBP)
  7. Add a My Scene component to MyActorBP
  8. Place multiple instances (3) of MyActorBP to the level
  9. Select all instances of MyActorBP and delete them
  10. Use Ctrl+Z to undo the delete action
  11. Select a single instance of MyActorBP and delete it

Result:
Editor crashes when trying to delete the actor again.

Callstack
MachineId:9FA88CA44B7C623122B0039D6C8BA1B0
EpicAccountId:c807849e05a0413d99e379f2802cae9c

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

"Assertion failed: ChildCount > AttachChildren.Num() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.10\Engine\Source\Runtime\Engine\Private\Components\SceneComponent.cpp] [Line: 680] 
Att

UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\misc\outputdevice.cpp:374]
UE4Editor_Engine!USceneComponent::OnComponentDestroyed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\scenecomponent.cpp:680]
UE4Editor_Engine!UActorComponent::DestroyComponent() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\actorcomponent.cpp:946]
UE4Editor_Engine!AActor::DestroyConstructedComponents() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\actorconstruction.cpp:163]
UE4Editor_Engine!AActor::RerunConstructionScripts() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\actorconstruction.cpp:354]
UE4Editor_Engine!ULevel::IncrementalUpdateComponents() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\level.cpp:783]
UE4Editor_Engine!UWorld::UpdateWorldComponents() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\world.cpp:1321]
UE4Editor_UnrealEd!UEditorEngine::Map_Load() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorserver.cpp:2479]
UE4Editor_UnrealEd!UEditorEngine::HandleMapCommand() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorserver.cpp:5897]
UE4Editor_UnrealEd!UEditorEngine::Exec() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorserver.cpp:5391]
UE4Editor_UnrealEd!UUnrealEdEngine::Exec() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedsrv.cpp:743]
UE4Editor_UnrealEd!FEditorFileUtils::LoadMap() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\filehelpers.cpp:2014]
UE4Editor_UnrealEd!FEditorFileUtils::LoadDefaultMapAtStartup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\filehelpers.cpp:3215]
UE4Editor_UnrealEd!FUnrealEdMisc::OnInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedmisc.cpp:299]
UE4Editor_UnrealEd!EditorInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealed.cpp:86]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:133]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\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 toAnswerHub just mention UE-25780 in the post.

0
Login to Vote

Cannot Reproduce
Affects Versions4.10
Target Fix4.11
CreatedJan 20, 2016
ResolvedJan 27, 2016
UpdatedJul 27, 2016