Stackoverflow in Blueprints when attaching component unless i add a breakpoint

I have a blueprint “GrandParentBP” and I have added a blueprint as a child component “ParentBP”.

During BeginPlay of “GrandParentBP” i do the following

  • AddChildActorComponent (Actor Class of “BabyBP”)
  • AttachComponentToComponent (Parent being “ParentBP”)

This causes a stackoverflow exception from ForEachAttachedActors. These are very simple objects and not using loops. Adding a breakpoint will allow this to work without fail. Sometimes if i press the play button from the blueprint screen instead of the primary screen it will work, but 100% fail rate when pressing play from the primary screen

These are all different types. Any help would be greatly appreciated

This occurred because I was using “Attach Component To Component” instead of “Attach Actor To Component” it didn’t complain but it can really mess things up so check if this is your issue i lost many hours to this