Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.11.2

Issue ID

ADDR-1946

Regression

Yes

Exceptions are not caught with try-catch block when using AssetReference.LoadSceneAsync with invalid Scene

Package: Build Pipeline - Addressables

-

How to reproduce:
1. Open the attached project's "case_1322452-Project.zip" Scene labeled "SampleScene"
2. Enter the Play Mode
3. Inspect the Console Window

Expected result: Exceptions are caught
Actual result: Exceptions are not caught

Reproducible with: 1.11.2, 1.17.17 (2018.4.34f1, 2019.4.24f1, 2020.3.7f1, 2021.1.6f1, 2021.2.0a15)
Not reproducible with: 1.10.0 (2018.4.34f1, 2019.4.24f1, 2020.3.7f1, 2021.1.6f1, 2021.2.0a15)

  1. Resolution Note:

    Because this is an async operation, by the time an exception is hit, it likely cannot be passed up to the calling code. As such, we never attempt to pass it up, but instead catch the exception ourselves and log it. So two notes.
    1. Exceptions are indeed caught, they're just also logged, which could make them appear as "not caught"
    2. If a user wishes to actively process exceptions, they should do so via the ResourceManager.ExceptionHandler as outlined here https://docs.unity3d.com/Packages/com.unity.addressables@1.17/manual/ExceptionHandler.html

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.