Description

An ensure in GatherSubobjectData is being hit under certain inheritance conditions.
This appears to be similar and potentially related to [Link Removed] and the fix at CL 16377852.
Stepping through USubobjectDataSubsystem::FindAttachParentForInheritedComponent, it gets to the recursive search for the node in the child set, but never finds anything, so OutHandle remains set as InvalidHandle.

Steps to Reproduce

Create the following BP classes (StaticMeshComponents can be used instead of SceneComponents):
BP_Grandparent
DefaultSceneRoot

  • SceneComponent named GPOuter
    • SceneComponent named GPInner

BP_Parent (subclasses BP_Grandparent)
DefaultSceneRoot

  • SceneComponent named GPOuter (Inherited)
    • SceneComponent named GPInner (Inherited)
      • SceneComponent named Parent

BP_Child (subclasses BP_Parent)
No modifications / additions to scene component tree

When the BP_Child blueprint is compiled, the ensure(ParentHandle.IsValid()) in USubobjectDataSubsystem::GatherSubobjectData is failed.

This repro doesn’t happen every time, and can be triggered by compiling the child on occasion. For a 100% reproducibility rate, open the Parent BP then open the Child BP. The grandparent doesn’t seem to be necessary to open at all, and the parent BP can be closed at the time of opening the Child BP.
Opening the child first will not ensure until the child is opened again at some point after the parent has been opened.
Additionally, once the ensure is hit once, it won’t be hit again until the editor is restarted, even when testing on a separate BP hierarchy with the same repro setup.

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions5.4
Target Fix5.4
Fix Commit30365818
Main Commit30365837
CreatedNov 27, 2023
ResolvedDec 16, 2023
UpdatedJan 20, 2024