# Naming a NamedSlot inside another causes infinite loop and crash

**URL:** <https://forums.unrealengine.com/t/naming-a-namedslot-inside-another-causes-infinite-loop-and-crash/393751>\
**Category:** UI\
**Tags:** unreal-engine, bug-report, question, Blueprint, UMG\
**Created:** [May 16, 2017, 12:29pm UTC](https://forums.unrealengine.com/t/naming-a-namedslot-inside-another-causes-infinite-loop-and-crash/393751 "2017-05-16T12:29:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benui](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benui/32/1145446_2.png) [@benui](https://forums.unrealengine.com/u/benui)\
**Post date:** [May 16, 2017, 12:29pm UTC](https://forums.unrealengine.com/t/naming-a-namedslot-inside-another-causes-infinite-loop-and-crash/393751/1 "2017-05-16T12:29:39Z")

</div>

1. Create a _UserWidget_, let’s call it **ParentWidget**
2. Inside Parent, create a _NamedSlot_, let’s call it **ContentSlot**
3. Create another _UserWidget_, let’s call it **ChildWidget**
4. Inside **ChildWidget** , add an instance of **ParentWidget**
5. Inside the **ContentSlot** of **ParentWidget** , drag in a new _NamedSlot_
6. Rename the new slot to “ **ContentSlot** ” (the same as its containing slot)
7. Crash

The crash happens because of a stack overflow on UNamedSlot::OnSlotRemoved(UPanelSlot\* InSlot).

```
UE4Editor-UMG.dll!UNamedSlot::OnSlotRemoved(UPanelSlot * InSlot) Line 92	C++
UE4Editor-UMG.dll!UPanelWidget::ClearChildren() Line 225	C++
UE4Editor-UMG.dll!UUserWidget::Initialize::__l5::<lambda>(UWidget * Widget) Line 112	C++
UE4Editor-UMG.dll!UWidgetTree::ForWidgetAndChildren<void <lambda>(UWidget *) >(UWidget * Widget, UUserWidget::Initialize::__l5::void <lambda>(UWidget *) Pred) Line 107	C++
UE4Editor-UMG.dll!UWidgetTree::ForWidgetAndChildren<void <lambda>(UWidget *) >(UWidget * Widget, UUserWidget::Initialize::__l5::void <lambda>(UWidget *) Pred) Line 101	C++
UE4Editor-UMG.dll!UWidgetTree::ForWidgetAndChildren<void <lambda>(UWidget *) >(UWidget * Widget, UUserWidget::Initialize::__l5::void <lambda>(UWidget *) Pred) Line 101	C++
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [May 16, 2017, 9:11pm UTC](https://forums.unrealengine.com/t/naming-a-namedslot-inside-another-causes-infinite-loop-and-crash/393751/2 "2017-05-16T21:11:14Z")

</div>

Hello ,

I was able to reproduce this issue on our end. I have written up a report and I have submitted it to developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.

Link: [Unreal Engine Issues and Bug Tracker (UE-45109)](https://issues.unrealengine.com/issue/UE-45109)

Make it a great day

---

<div class="post-metadata">

**Author:** ![benui](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benui/32/1145446_2.png) [@benui](https://forums.unrealengine.com/u/benui)\
**Post date:** [May 17, 2017, 6:37am UTC](https://forums.unrealengine.com/t/naming-a-namedslot-inside-another-causes-infinite-loop-and-crash/393751/3 "2017-05-17T06:37:45Z")

</div>

Thanks so much Rudy!
