Commit Graph

17 Commits

Author SHA1 Message Date
mbalfour 51abef5071 Merge branch 'main' into mbalfour/spec-6178 2021-04-13 13:04:34 -05:00
mbalfour 0f841656e3 [LYN-2878] Attempt to fix deadlocks that occur when the Editor loads surface tag assets.
I wasn't able to reproduce the deadlock, but from the reported callstack, the following lock inversion happens:
* EditorSurfaceDataSystemComponent::OnCatalogLoaded locked the AssetCatalogRequestBus mutex by calling EnumerateAssets, and then locked m_assetMutex inside GetAsset->FindOrCreateAsset inside the enumerate callback.
* Loading threads would lock m_assetMutex in AssetManager::ValidateAndRegisterAssetLoading, then lock the AssetCatalogRequestBus inside the Asset<T> copy constructor when calling UpdateDebugStatus when the constructor calls SetData->UpgradeAssetInfo->UpdateAssetInfo->AssetCatalogRequestBus::GetAssetInfoById

This should solve the lock inversion on both sides of the problem:
* UpdateDebugStatus now takes in a const ref instead of a copy, so the copy constructor isn't called.
* EditorSurfaceDataSystemComponent::OnCatalogLoaded is rewritten to call GetAsset outside of the enumeration call.

As a bonus, this also removes the blocking load call.  The rest of the code already supports asynchronous refreshes as the list assets are added / modified / removed, so this code was changed to leverage the asynchronous refreshes as well.
2021-04-13 13:03:43 -05:00
Alex Peterson 921eb742d4 Merge branch 'main' into github/staging 2021-04-13 09:46:26 -07:00
Nicholas Van Sickle 22684af141 Merge branch 'main' into nvsickle/EditorViewportWidgetFixes 2021-04-12 12:15:45 -07:00
Alex Peterson cd12226849 Merge branch 'main' into github/staging 2021-04-12 08:48:09 -07:00
alexpete b8e508c2ee Cherrypicking MeshCompiler fix 2021-04-12 08:45:38 -07:00
greerdv 51f1183ff4 making scale gizmo apply uniform scale to transform 2021-04-10 15:58:42 +01:00
nvsickle 1c47a26494 Clarify the reason for the default view juggling in SetAsActiveViewport 2021-04-09 14:19:41 -07:00
nvsickle 1dabb39b98 Migrate fixes from CodeCommit branch 2021-04-09 12:40:43 -07:00
alexpete c5b955d281 Integrating github/staging through commit b0dd7ed 2021-04-09 12:03:26 -07:00
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 2021-04-09 11:27:37 -07:00
alexpete c2cbd430fe Integrating up through commit 90f050496 2021-04-07 14:03:29 -07:00
Brian Herrera 39f53338bf Merge branch 'main' into LoadPipelineFromGitHub 2021-03-26 17:05:57 -07:00
alexpete 36c4e827bd Integrating latest from github/staging
Integrating up through commit 5e1bdae
2021-03-26 14:32:02 -07:00
Brian Herrera e8bbb5a0d5 Set scripts to be executable
This is required to build on linux/mac
2021-03-26 09:26:12 -07:00
alexpete 75dc720198 Integrating latest 47acbe8 2021-03-25 13:57:57 -07:00
alexpete a10351f38d Initial commit 2021-03-08 14:30:57 -08:00