Search Issue Tracker

Active

Under Consideration for 2021.3.X, 2022.3.X

Votes

1

Found in

2021.3.38f1

2022.3.28f1

6000.0.1f1

Issue ID

UUM-71475

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

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.