Description

If exiting the editor before the EditorUtilityTask completes, it crashes. It will not crash if canceling the UtilityTask and then exit the editor. The following implementation does not allow destructors during execution. 

FCoreAsyncTaskNotificationImpl::~FCoreAsyncTaskNotificationImpl()
{
    checkf(State != EAsyncTaskNotificationState::Pending, TEXT("AsyncTaskNotification was still pending when destroyed. Missing call to SetComplete?"));
} 
Steps to Reproduce

1. Open the attached project
2. Right click on AAU_Test, Run Editor Utility Blueprint
3. Exit the editor before the Editor Utility Task completes

Callstack

 

LoginId:6aef52b34b47ff528b71a0bc9fe63dfd
EpicAccountId:fb567da00f03436dabdb32db92746435Assertion failed: State != EAsyncTaskNotificationState::Pending [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Misc\CoreAsyncTaskNotificationImpl.cpp] [Line: 17] 
AsyncTaskNotification was still pending when destroyed. Missing call to SetComplete?
UnrealEditor_Core!FCoreAsyncTaskNotificationImpl::~FCoreAsyncTaskNotificationImpl() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Misc\CoreAsyncTaskNotificationImpl.cpp:17]
UnrealEditor_Slate!FSlateAsyncTaskNotificationImpl::~FSlateAsyncTaskNotificationImpl() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Notifications\SlateAsyncTaskNotificationImpl.cpp:35]
UnrealEditor_Core!FAsyncTaskNotification::~FAsyncTaskNotification() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Misc\AsyncTaskNotification.cpp:17]
UnrealEditor_Blutility!UEditorUtilityTask::~UEditorUtilityTask() [D:\build\++UE5\Sync\Engine\Intermediate\Build\Win64\UnrealEditor\Inc\Blutility\UHT\EditorUtilityTask.gen.cpp:422]
UnrealEditor_Blutility!UEditorUtilityTask::`vector deleting destructor'()
UnrealEditor_CoreUObject!FAsyncPurge::TickDestroyGameThreadObjects() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp:771]
UnrealEditor_CoreUObject!IncrementalDestroyGarbage() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp:4899]
UnrealEditor_CoreUObject!IncrementalPurgeGarbage() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp:4574]
UnrealEditor_CoreUObject!UE::GC::PostCollectGarbageImpl<1>() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp:5585]
UnrealEditor_CoreUObject!UE::GC::FReachabilityAnalysisState::PerformReachabilityAnalysisAndConditionallyPurgeGarbage() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp:5771]
UnrealEditor_CoreUObject!CollectGarbage() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp:6007]
UnrealEditor_PythonScriptPlugin!FPyReferenceCollector::PurgeUnrealGeneratedTypes() [D:\build\++UE5\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyReferenceCollector.cpp:176]
UnrealEditor_PythonScriptPlugin!FPythonScriptPlugin::ShutdownPython() [D:\build\++UE5\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:1182]
UnrealEditor_PythonScriptPlugin!V::TBaseRawMethodDelegateInstance::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:534]
UnrealEditor!TMulticastDelegate<void __cdecl(void),FDefaultDelegateUserPolicy>::Broadcast() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:956]
UnrealEditor!FEngineLoop::AppPreExit() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:6862]
UnrealEditor!FEngineLoop::Exit() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5148]
UnrealEditor!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:194]
UnrealEditor!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
UnrealEditor!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
UnrealEditor!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
UnrealEditor!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll  

 

 

Have Comments or More Details?

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

1
Login to Vote

Unresolved
ComponentUE - Editor - UI Systems
Affects Versions5.4
Target Fix5.5
CreatedMay 29, 2024
UpdatedAug 5, 2024
View Jira Issue