Trash components cause UE4.10.1 crash
Recently I converted my project from 4.9 to 4.10.1, and always get crash every time when I closing a PIE session or closing blueprint window. This never happened in 4.9.
If I run PIE and stop, or open my blueprint and close it, the engine will crash in SceneComponent.cpp line 680:
checkf(ChildCount > AttachChildren.Num(), TEXT("AttachChildren count increased while detaching '%s', likely caused by OnAttachmentChanged introducing new children, which could lead to an infinite loop."), *Child->GetName());
I also found similar bug report, but I found more easily way and more information about this crash. https://answers.unrealengine.com/questions/336053/crash-on-closing-pie-or-bp.html
This bug can reproduce in blank UE4.10 and UE4.9 C++ project. However in UE4.9 only have incorrect behavior, but this incorrect behavior caused crash in UE4.10.
Reproduce steps: 1 Create a C++ class called MyBaseActor as the attached files shows link text.
2 Create a BP class MyFirstBPActor derived from MyBaseActor Add a variable "manager" which type is Actor.
3 Create a BP class DerivedBPActor derived from MyFirstBPActor
4 Create a BP Interface ActorManagerInterface which has 2 functions
5 Edit Construction script in "both" DerivedBPActor and MyFirstBpActor:
6 Compile all the class, save, and reopen UE4.
7 Open MyFirstBPActor and close it. It works fine.
8 Open DerivedBPActor and close it. It gets crash.
If we print children components of DerivedBPActor in ConstructionScript.
It shows 4 children components:
LogBlueprintUserMessages: [DerivedBPActor_C_0] Component nums: 4
LogBlueprintUserMessages: [DerivedBPActor_C_0] TRASH_Default__MyFirstBPActor_C_0.CapsuleComponent
LogBlueprintUserMessages: [DerivedBPActor_C_0] TRASH_Default__MyFirstBPActor_C_0.StaticMeshComponent
LogBlueprintUserMessages: [DerivedBPActor_C_0] DerivedBPActor_C_0.CapsuleComponent
LogBlueprintUserMessages: [DerivedBPActor_C_0] DerivedBPActor_C_0.StaticMeshComponent
The crash condition in this case (SceneComponent.cpp line 680) is
ChildCount=2 > AttachChildren.Num()=2, so the checkf fails.
It is because the parent of TRASH_Default__MyFirstBPActor_C_0.StaticMeshComponent is not DerivedBPActor->RootComponent.
Please let me know if you require more information. Thank you.
asked Dec 16 '15 at 06:18 PM in Bug Reports
Thank you for posting additional information regarding this issue. This bug exists in our system as UE-23366. I will update the report with the additional information you have provided.
Have a great day,
answered Dec 17 '15 at 03:47 PM
Sean L ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here