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
- UGUI Pointer Enter/Exit does not always trigger when hovering quickly over it
- Longer Add Component submenu labels obscure UI and are not truncated
- Scripts submenu of the Add Component Menu can be scrolled horizontally
- Documentation link icons' are not aligned in he "Recommendation" tab
- "Game Specifications" section becomes blank, and users get "ArgumentException: Cannot unschedule unknown scheduled function" during the "Game Specification" selection when the "Multiplayer Center" window is docked
Resolution Note (fix version 1.5.x or higher):
This fix was released toward the end of 2019.