Search Issue Tracker
Fixed in 1.5.x or higher
Votes
3
Found in [Package]
1.2.4
Issue ID
1190427
Regression
Yes
[Addressables] Exception is thrown when unloading Addressable Scene with UnloadSceneAsync(loadHandle)
How to reproduce:
1. Open user's attached project ("Addressable Unload Scene Bug.zip") using the EnvIronman VM (optional) (more information in Edit).
2. Open SampleScene scene
3. Enter Play mode
4. Press 'L' to load AddressableScene scene
5. Press 'U' to unload AddressableScene scene
Expected result: No exception is thrown
Actual result: Exception is thrown
Reproducible with: 2018.4.11f1, 2019.2.9f1, 2019.3.0b6, 2020.1.0a8 (all version were tested with Addressables 1.1.9, 1.2.4)
Not reproducible with: 2018.4.11f1, 2019.2.9f1, 2019.3.0b6, 2020.1.0a8 (all version were tested with 1.1.7)
Comments (3)
-
HLSeanStevens
Feb 08, 2020 00:29
This issue was fixed in: [1.5.0] - 2019-12-09
https://docs.unity3d.com/Packages/com.unity.addressables@1.6/changelog/CHANGELOG.html
"Fixed issue where unloading a scene was throwing an invalid handle error." -
RunninglVlan
Nov 13, 2019 13:58
Yeah, and I reproduced it using Addressables v1.3.8 (and Unity v2019.3.0b8).
-
RunninglVlan
Nov 13, 2019 13:44
Some more info:
Actual exception: "Exception: Attempting to use an invalid operation handle"Because of this Exception `Addressables.UnloadSceneAsync(AsyncOperationHandle).Completed` isn't called.
Did some digging: checked Addressables Event Viewer, and there's some leftover operation every time I load and unload a scene: "UnityEngine.ResourceManagement.ResourceProviders.SceneProvider+UnloadSceneOp, result'', status='None'". Checked frame events, and it seems duplicate unload operation is created:
first there's AsyncOperationCreate - Scene(New Scene)
then AsyncOperationComplete - Scene(New Scene)
then ...Create - ...UnloadSceneOp
then one more ...Create - ...UnloadSceneOp
tehn ...Destroy - Scene(New Scene)
then ...Complete - ...UnloadSceneOp 2 times
and only 1 ...Destroy - ...UnloadSceneOpException isn't thrown using `Addressables.UnloadSceneAsync(SceneInstance)`. Leftover operation is still there with this approach too.
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
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
Resolution Note (fix version 1.5.x or higher):
This fix was released toward the end of 2019.