The fix is theorycrafted by reasoning about the code - I was not able to actually reproduce this.
The callstack suggests a nullptr exception, indicating that the Find() in AssetDataCache failed. The AssetDataToFetch container is populated in two places:
- AddAssetInformationEntry()
- OnUpdateHistoryComplete()
The AddAssetInformationEntry() method populates the AssetDataCache and optionally the AssetDataToFetch container.
The OnUpdateHistoryComplete() assumes the entry in AssetDataCache exists and populates the AssetDataToFetch container.
The ClearPendingTasks() removes pending entries from the AssetDataCache container.
However, it doesn't wait for any pending FUpdateStatus task to be finished.
Thus, if the ClearPendingTasks() method is called after GetFileHistory() queues an FUpdateStatus operation but before that operation returns, the OnUpdateHistoryComplete() would queue an entry in AssetDataToFetch while there is no accompanying entry in AssetDataCache. This will result in the crash. The ClearPendingTasks() is called on shutdown, when the source control provider changes or when the source control dialog is shown - the latter being the most likely thing to have happened.
#rb luc.eygasier, manuel.lang
[CL 32496768 by wouter burgers in 5.4 branch]
* Adds Source Control Asset Data cache. Preventing Source Control Changelist Window to rebuild AssetData from scratch when UI refresh takes place
* Modifies Source Control beautification to async process, preventing crowded changelists to block the workflow. The filenames are now beautified when available.
* Parallelize AssetData information retrieval from SourceControl
* Updates message displayed when refreshing window's items
#rb Sebastien.Lussier, JeanFrancois.Dube
#jira UETOOL-3522
#robomerge Private-Frosty
#changelist validated
[CL 17375288 by luc eygasier in ue5-main branch]