Description

If any SlowTask is canceled by the Editor's user, and later on the "Find in Blueprints" dialog is opened and needs to perform its async indexing task, the Editor crashes on thread FAsyncSearchIndexTaskRunnable with a read access violation exception. The same crash also happens if a SlowTask is started and canceled while the "Find in Blueprints" dialog is running its async indexing task.

No crash happens if, after the SlowTask has been canceled, another SlowTask completes successfully before the "Find in Blueprints" dialog needs to run the async indexing task. Also, no crash happens if "[BlueprintSearchSettings] bDisableThreadedIndexing=true" is added to config file DefaultEditor.ini.

As the UDN licensee noted in the linked case, the crash is probably related to the fact that GWarn is shared between SlowTasks and the indexing task performed by the "Find in Blueprints" dialog. In fact, after a SlowTask has been canceled, the check "GWarn->ReceivedUserCancel()" performed by function FCacheAllBlueprintsTickableObject::Tick() on file [Engine\Source\Editor\Kismet\Private\FindInBlueprintManager.cpp:1742] returns true. As a result, the code attempts to cancel the indexing task, which ends up causing the crash.

Steps to Reproduce
  • Download repro project from the attachments of the linked UDN case
  • Generate solution, compile and run
  • Open asset "BP_MyActor"
  • Run editor utility widget "EUW_SlowTask"
  • Click the button "Start Slow Task"
  • Before the task finishes, click the button "Cancel"
  • Open the "Find in Blueprints" dialog (press ctrl+shift+f or click the binoculars icon)
  • CRASH
  • Note: The crash also happens if, while the initial indexing performed by the "Find in Blueprints" dialog is running, a slow task is started and canceled.
  • Note: The crash does not happen if another slow task completes successfully before the "Find in Blueprints" dialog is opened. This is why "BP_MyActor" must be first opened before running the EUW's slow task.
Callstack

Exception on thread "FAsyncSearchIndexTaskRunnable": read access violation. this->AssetsPendingAsyncIndexing.Tail was nullptr.

Stack of thread "FAsyncSearchIndexTaskRunnable":

TQueue<FSoftObjectPath,1>::Dequeue() Line 74
FCacheAllBlueprintsTickableObject::GetAssetPathsToIndex() Line 1692
FAsyncSearchIndexTaskRunnable::Run() Line 1405
FRunnableThreadWin::Run() Line 149
FRunnableThreadWin::GuardedRun() Line 71

Stack of thread "GameThread":

FRunnableThreadWin::Kill() Line 100
FRunnableThreadWin::{dtor}() Line 55
FRunnableThreadWin::`scalar deleting destructor'()
TDefaultDelete<FRunnableThread>::operator()() Line 64
TUniquePtr<FRunnableThread,TDefaultDelete<FRunnableThread>>::{dtor}() Line 266
FAsyncSearchIndexTaskRunnable::`scalar deleting destructor'()
TDefaultDelete<FAsyncSearchIndexTaskRunnable>::operator()() Line 64
TUniquePtr<FAsyncSearchIndexTaskRunnable,TDefaultDelete<FAsyncSearchIndexTaskRunnable>>::{dtor}() Line 266
FCacheAllBlueprintsTickableObject::~FCacheAllBlueprintsTickableObject() Line 1558
FCacheAllBlueprintsTickableObject::`scalar deleting destructor'()
TDefaultDelete<FCacheAllBlueprintsTickableObject>::operator()() Line 64
TUniquePtr<FCacheAllBlueprintsTickableObject,TDefaultDelete<FCacheAllBlueprintsTickableObject>>::Reset() Line 343
FFindInBlueprintSearchManager::FinishedCachingBlueprints() Line 3532
FCacheAllBlueprintsTickableObject::Tick() Line 1745
FFindInBlueprintSearchManager::Tick() Line 3846

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - Gameplay - Blueprint
Affects Versions5.25.35.4.4
CreatedSep 17, 2024
UpdatedSep 17, 2024
View Jira Issue