# Crash on remove widget from viewport after end play

**URL:** <https://forums.unrealengine.com/t/crash-on-remove-widget-from-viewport-after-end-play/370346>\
**Category:** UI\
**Tags:** unreal-engine, crash, editor, Widget, Blueprint, question\
**Created:** [September 13, 2016, 7:03pm UTC](https://forums.unrealengine.com/t/crash-on-remove-widget-from-viewport-after-end-play/370346 "2016-09-13T19:03:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d78ada22](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d78ada22](https://forums.unrealengine.com/u/anonymous_user_d78ada22)\
**Post date:** [September 13, 2016, 7:03pm UTC](https://forums.unrealengine.com/t/crash-on-remove-widget-from-viewport-after-end-play/370346/1 "2016-09-13T19:03:36Z")

</div>

1. Create WidgetA and WidgetB classes
2. Setup WidgetA this way

[http://puu.sh/ra7PH/b5b74480ed.png](http://puu.sh/ra7PH/b5b74480ed.png)

1. Create instance of WidgetA and add it to viewport (from level bp for example)
2. Play
3. Quit and notice crash

I have also noticed that if ZOrder of WidgetB is 0 no crash appears

```
[2016.09.13-18.48.45:752][447]LogWindows:Error: === Critical error: ===
Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffff

UE4Editor-SlateCore.dll!TIndirectArray<SOverlay::FOverlaySlot,FDefaultAllocator>::DestructAndFreeItems() [s:\epic games\4.12.5\engine\source\runtime\core\public\containers\array.h:3410]
UE4Editor-SlateCore.dll!SOverlay::ClearChildren() [s:\epic games\4.12.5\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:171]
UE4Editor-Engine.dll!UGameViewportClient::RemoveAllViewportWidgets() [s:\epic games\4.12.5\engine\source\runtime\engine\private\gameviewportclient.cpp:2005]
UE4Editor-Engine.dll!UGameViewportClient::DetachViewportClient() [s:\epic games\4.12.5\engine\source\runtime\engine\private\gameviewportclient.cpp:237]
UE4Editor-Engine.dll!UEngine::CleanupGameViewport() [s:\epic games\4.12.5\engine\source\runtime\engine\private\unrealengine.cpp:1775]
UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [s:\epic games\4.12.5\engine\source\editor\unrealed\private\editorengine.cpp:963]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [s:\epic games\4.12.5\engine\source\editor\unrealed\private\unrealedengine.cpp:368]
UE4Editor.exe!FEngineLoop::Tick() [s:\epic games\4.12.5\engine\source\runtime\launch\private\launchengineloop.cpp:2775]
UE4Editor.exe!GuardedMain() [s:\epic games\4.12.5\engine\source\runtime\launch\private\launch.cpp:148]
UE4Editor.exe!GuardedMainWrapper() [s:\epic games\4.12.5\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [s:\epic games\4.12.5\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
KERNEL32.DLL
ntdll.dll
ntdll.dll

```

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [September 13, 2016, 7:34pm UTC](https://forums.unrealengine.com/t/crash-on-remove-widget-from-viewport-after-end-play/370346/2 "2016-09-13T19:34:44Z")

</div>

Hello,

This is currently a known issue, which you can track the status of here: [Unreal Engine Issues and Bug Tracker (UE-35726)](https://issues.unrealengine.com/issue/UE-35726)

Have a great day!
