Description

When a running search in all blueprints is closed, it may prevent an AsyncTask used to return the look up FText's from StringTables from running on the game thread, leading to a deadlock.

When the search window is closed, the StreamSearch is ended. This involves waiting on all pending tasks to complete. The async task requires access to the game thread to complete, but as the game thread is blocked, it cannot do so, and this results in a deadlock condition.

This is unlikely to occur on fresh projects without the repro steps below. It occurs more readily on larger projects that rely on StringTables, however,

Steps to Reproduce

The easiest way to replicate this is via thread freeze/thaw.
1. Place a breakdown on Line 51 in ImaginaryBlueprintData.cpp (TPromise<bool> Promise[Image Removed]
2. Place a breakdown on Line 1084 in FindInBlueprint.cpp (StreamSearch->EnsureCompletion()[Image Removed]
3. Create a string table with any value
4. Add a format text node in a BP and link it to the string table
5. Find in All BPs for the text that the node will return (The value that is pointed to by the string table.)
6. When the first breakpoint is hit, freeze that thread.
7. Continue execution and close the search window.
8. The second breakpoint should be hit. Continuing will result in the game thread locking up as the search thread is frozen.
9. Confirm this is a deadlock by thawing the search thread/thawing all threads. The two threads are now waiting on each other to complete work and won't recover.

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint Editor
Affects Versions5.4.35.2
Target Fix5.5
Fix Commit34744857
CreatedJun 19, 2024
ResolvedJun 28, 2024
UpdatedJul 23, 2024
View Jira Issue