Description

Widget is causing an ensure to be hit when exiting gameplay. 

Tested in: 4.24 Preview2 CL#10091930 , 4.25 CL#10183780

 

Attached URL's from the user: 

https://forums.unrealengine.com/community/general-discussion/1530914-ensure-condition-failed-isgarbagecollecting

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1513766-widget-garbage-collection

[Link Removed]

 

Steps to Reproduce
  1. Download the attached project and generate Visual Studio files
  2. launch through Visual Studio 
  3. Press play
  4. Wait for 2-5 seconds
  5. end play

Results: Ensure is hit when ending gameplay 

Expected: No ensure to be triggered

Callstack

LogOutputDevice: Error: === Handled ensure: === LogOutputDevice: Error: Ensure condition failed: !IsGarbageCollecting() [File[Image Removed]:/Build/++UE4/Sync/Engine/Source/Runtime/UMG/Private/Slate/SObjectWidget.cpp] [Line: 43] LogOutputDevice: Error: SObjectWidget for 'WBP_Prefab_MenuAnchor_C /Engine/Transient.UnrealEdEngine_0:GameInstance_0.TestWidget_C_0.WidgetTree_0.WBP_ToolSelectGroup.WidgetTree_0.WBP_Prefab_MenuAnchor' destroyed while collecting garbage. This can lead to multiple GCs being required to cleanup the object. Possible causes might be, LogOutputDevice: Error: 1) ReleaseSlateResources not being implemented for the owner of this pointer. LogOutputDevice: Error: 2) You may just be holding onto some slate pointers on an actor that don't get reset until the actor is Garbage Collected. You should avoid doing this, and instead reset those references when the actor is Destroyed. LogOutputDevice: Error: Stack: LogOutputDevice: Error: [Callstack] 0x00007ff933a7309e UE4Editor-UMG.dll!DispatchCheckVerify<bool,<lambda_12a5657db78d6de5f60ce8eafba611d0> >() [d:\build++ue4\sync\engine\source\runtime\core\public\misc\assertionmacros.h:164] LogOutputDevice: Error: [Callstack] 0x00007ff9338e0746 UE4Editor-UMG.dll!SObjectWidget::~SObjectWidget() [d:\build++ue4\sync\engine\source\runtime\umg\private\slate\sobjectwidget.cpp:43] LogOutputDevice: Error: [Callstack] 0x00007ff936fea29a UE4Editor-SlateCore.dll!FSlotBase::~FSlotBase() [d:\build++ue4\sync\engine\source\runtime\slatecore\private\slotbase.cpp:71] LogOutputDevice: Error: [Callstack] 0x00007ff936f7396f UE4Editor-SlateCore.dll!SOverlay::FOverlaySlot::`vector deleting destructor'() [] LogOutputDevice: Error: [Callstack] 0x00007ff936f66ad4 UE4Editor-SlateCore.dll!SOverlay::~SOverlay() [] LogOutputDevice: Error: [Callstack] 0x00007ff936f6dac4 UE4Editor-SlateCore.dll!TSlotBase<FSimpleSlot>::operator[]() [d:\build++ue4\sync\engine\source\runtime\slatecore\public\slotbase.h:91] LogOutputDevice: Error: [Callstack] 0x00007ff93391378c UE4Editor-UMG.dll!UUserWidget::BeginDestroy() [d:\build++ue4\sync\engine\source\runtime\umg\private\userwidget.cpp:439] LogOutputDevice: Error: [Callstack] 0x00007ff9354fb7c3 UE4Editor-CoreUObject.dll!UObject::ConditionalBeginDestroy() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:989] LogOutputDevice: Error: [Callstack] 0x00007ff9354d6aec UE4Editor-CoreUObject.dll!UnhashUnreachableObjects() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1916] LogOutputDevice: Error: [Callstack] 0x00007ff93547f8c2 UE4Editor-CoreUObject.dll!CollectGarbageInternal() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1859] LogOutputDevice: Error: [Callstack] 0x00007ff93547ea0a UE4Editor-CoreUObject.dll!CollectGarbage() [d:\build++ue4\sync\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1946] LogOutputDevice: Error: [Callstack] 0x00007ff93011b7ff UE4Editor-UnrealEd.dll!UEditorEngine::EndPlayMap() [d:\build++ue4\sync\engine\source\editor\unrealed\private\playlevel.cpp:479] LogOutputDevice: Error: [Callstack] 0x00007ff92fc0ef43 UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1909] LogOutputDevice: Error: [Callstack] 0x00007ff930465296 UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:407] LogOutputDevice: Error: [Callstack] 0x00007ff7d4fe7b0a UE4Editor.exe!FEngineLoop::Tick() [d:\build++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:4257] LogOutputDevice: Error: [Callstack] 0x00007ff7d4ffa91c UE4Editor.exe!GuardedMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\launch.cpp:173] LogOutputDevice: Error: [Callstack] 0x00007ff7d4ffa9fa UE4Editor.exe!GuardedMainWrapper() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:147] LogOutputDevice: Error: [Callstack] 0x00007ff7d500b92c UE4Editor.exe!WinMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:279] LogOutputDevice: Error: [Callstack] 0x00007ff7d500e60e UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] LogOutputDevice: Error: [Callstack] 0x00007ff98edd7bd4 KERNEL32.DLL!UnknownFunction [] LogOutputDevice: Error: [Callstack] 0x00007ff990b6ced1 ntdll.dll!UnknownFunction []

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-84493 in the post.

8
Login to Vote

Fixed
ComponentUE - Editor - UI Systems
Affects Versions4.23.14.244.25
Target Fix4.26
Fix Commit14503909
Release Commit14503909
CreatedNov 15, 2019
ResolvedOct 15, 2020
UpdatedAug 10, 2021