* Asset<T>::QueueLoad didn't trigger any loads in the case where an asset was in a Queued state, it simply returned the reference. This caused problems in the case where an asset was in the process of being cancelled and garbage collected, as it could be in a queued state with nothing actively loading it. The method now detects this case and calls GetAsset(), which triggers a new load.
* AssetContainer::IsValid() was returning true for canceled containers that no longer had a root asset. Now it returns false, to help ensure the container doesn't try to get reused.
* AssetContainer would add entries to the preloadList even if any potential preloads were filtered out from the load. They are no longer added, since they shouldn't be waiting for any dependent assets to load. (This could cause incorrect warnings to print in some situations)
* AssetContainer was erroneously warning about removing assets from a missing waiting list. The warning was removed, as the condition could occur when the same asset was being loading by two different containers - once with dependencies and once without.
* AssetDataStream::RequestCancel has been added, as it was missing, but nothing currently needs to use it.
* AssetManager::GetAssetContainer() now verifies that the container is valid before attempting to reuse it. This prevents asset containers that are in the middle of cancellation from getting reused.
the project root and engine root to fix issues with running the Editor
or AssetProcessor from within the project folder overriding the
project_path with the engine root bootstrap.cfg project_path entry
The order in which the project path is overridden as follows
1. The <engine-root>/bootstrap.cfg is first merged into the Settings
Registry. Any '/Amazon/AzCore/Bootstrap/project_path' would be used
if the following steps don't override that key.
2. Followed by general *.setreg/*.setregpatch files being merged into
the Settings Registry which can override the
'/Amazon/AzCore/Bootstrap/project_path' key
3. Next a project.json file searched upwards from the current executable
directory to determine the project path
4. Finally if a command line parameter that overrides the project path
is supplied it is used instead
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.
* removed the script rule from the Editor, now will only be supported via a script or JSON manual edits
* Mesh Serialization - scriptProcessorRule doesn't save with field empty, but produces no error
* added a test to make sure Script Processor Rule operates with an empty filename
Jira: https://jira.agscollab.com/browse/ATOM-14889
Tests: Launched the Editor to removed the script rule from the Editor