Infinite recursion in SSceneOutliner::AddUnfilteredItemToTree

Since version 4.11 we’re hitting an infinite recursion bug where SSceneOutliner::AddUnfilteredItemToTree() and SSceneOutliner::EnsureParentForItem() call each other recursively because Item->CreateParent() endlessly returns a new items.

This seems to be related to a change in AActor::GetAttachParentActor() where it no longer checks that the returned value is != this. Was this deliberate?

Hi Sam,

The new implementation of the GetAttachParentActor function finds the root component of the actor and returns it’s parent, which should always be either null or belong to a different actor. If that is not the case, then that isn’t truly the root component of that actor.

It’s possible that somewhere, the root component of an actor is being attached to another component on the same actor without the new component being set to root. That could cause the infinite recursion you’re seeing. The AttachTo function doesn’t currently check for this.

Best,

Cody