Search Issue Tracker

Active

Votes

12

Found in

2019.4

2020.3

2021.3

2021.3.0f1

2022.1

2022.2

Issue ID

1427315

Regression

No

Exceptions are not logged when thrown from "async Task"

Scripting

-

How to reproduce:
1. Open project "LogsInAsync.zip"
2. In the Hierarchy window select "GameObject" GameObject
3. In the Inspector window press on three dots of the script Component and choose "Call Async Methods"
4. Observe the Console window

Expected result: Exception is logged
Actual result: Exception is not logged

Reproducible with: 2019.4.39f1, 2020.3.35f1, 2021.3.3f1, 2022.1.2f1, 2022.2.0a15

Reproducible on: macOS 11.6 (Intel)

Comments (1)

  1. bob_ross_tree

    Sep 09, 2022 13:34

    In case anybody needs a temporary solution until unity fixes it.
    The following code should should catch these exceptions.

    System.Threading.Tasks.TaskScheduler.UnobservedTaskException += (_, e) => Debug.LogException(e.Exception);

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.