AActor::SetFolderPath contains a pretty severe bug.
It recursively calls itself for all owners of the actor’s RootComp->AttachChildren but fails to verify that these owners are not the actor itself.
If RootComp->AttachParent is null, the second call to SetFolderPath will exit immediately at the start of the function so in many cases the function will work. But if RootComp->AttachParent is non null and bDetachFromParent is false, then the function will call itself ad-infinitum and cause a stack overflow.
An obvious fix is to replace:
if(ChildActor)
by:
if(ChildActor && ChildActor != this)
How to reproduce:
- In a map, create two actors.
- Put them under a folder in the map hierarchy.
- Put one of them under the other in the map hierarchy.
- Rename the folder.
- Notice the Editor freezes for a few seconds, then pops up a stack overflow dialog.
Cheers,