Search Issue Tracker
Fixed
Fixed in 1.22.2, 2.2.2
Votes
1
Found in [Package]
1.22.2
2.1.0
Issue ID
ADDR-3695
Regression
No
The validity of the multiple handles can behave differently based on the load/release operations order, when multiple Addressables.LoadAssetAsync and Addressables.Release are used to load and release the same Addressable Asset
How to reproduce:
1. Open the “AddressablesReleaseBug“ project
2. Open the “SampleScene”
3. Open the TestRunner window (Window → General → TestRunner)
4. Press “Run All” button
5. Observe that all of the tests failed
6. Open the “NewTestScript” script (Assets → Tests → NewTestScript.cs)
7. Comment out following lines of code under the DemonstrateAddressablesLoadReleaseBug function:
{{//Load 1}}
{{var handle1 = Addressables.LoadAssetAsync<TextAsset>("TestAsset.txt");}}
{{Assert.IsTrue(handle1.IsValid());}}
{{handle1.WaitForCompletion();}}
{{Assert.IsTrue(handle1.IsDone);}}
{{// Free 1}}
{{SafeRelease(handle1);}}
{{Assert.IsFalse(handle1.IsValid());}}
8. Repeat steps 3 and 4
9. Observe that all of the tests succeeded
Expected result: Addressables.release on the same asset should abide by the reference count on it and each handle should be able to be released only once to avoid confusion
Actual result: Addressables.release on the same asset does not follow the reference count on it and each handle is able to be released more than once so there is a need to monitor the isValid boolean flag to invalidate before releasing
Reproducible in: 2021.3.38f1, 2022.3.28f1, 6000.0.1f1
Reproduced on: Windows 10, macOS 14.4 (M1)
Not reproduced on: No other environments tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
Resolution Note (fix version 2.2.2):
Addresables API updated: `Addressables.Release(handle)` is deprecated, use `AsyncOperationHandle.Release()` instead to ensure that internal state is properly reset