Some tools like the Chaos Visual Debugger need to spawn a large number of transient actors, which will result in actor label creations which becomes expensive due to that asset data update attempt. Transient packages cannot be sabed, therefore we can safely skip the update in the source control module for them.
#jira UE-189695
[FYI] wouter.burgers
#tests Tested in the editor that if I change the label of any actor in a saved map, the code to update the assed data cache is still called. But if the actors are from a transient world (like in the Chaos Visual Debugger) the update is no longer executed (as expected).
[CL 33563896 by sergio gardeazabal in ue5-main branch]
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 32014349 by wouter burgers in ue5-main 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]