- Create a UserWidget, let’s call it ParentWidget
- Inside Parent, create a NamedSlot, let’s call it ContentSlot
- Create another UserWidget, let’s call it ChildWidget
- Inside ChildWidget, add an instance of ParentWidget
- Inside the ContentSlot of ParentWidget, drag in a new NamedSlot
- Rename the new slot to “ContentSlot” (the same as its containing slot)
- 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++