Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2023.1.0a4
Issue ID
UUM-9868
Regression
Yes
Getting a null exception when catching awaited Task cancelation
Reproduction steps:
1. Open the user's attached project
2. Open Window > General > Test Runner
3. In the Test Runner window select PlayMode and click "Run All"
Expected result: The "TaskException_IsHandledSynchronously" test fails
Actual result: The "TaskException_IsHandledSynchronously" test is successful
Reproducible with: 2021.2.0a18, 2021.3.6f1, 2022.1.9f1, 2022.2.0b1, 2023.1.0a3
Not reproducible with: 2020.3.37f1, 2021.2.0a17
Reproducible with: Windows 10
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
- Redoing creation of Sub Scenes and Cube GameObjects in Hierarchy throws “Assertion failed on expression: 'targetScene != nullptr’” error in Console window
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
Resolution Note:
This is actually a fix coming from a Mono update to align await behavior with CoreCLR. Any "await" statement that is not already completed have there continuation scheduled using the current execution context, even if the SetResult or SetException call raising completion happens from the same thread.
So in that case, the test check for the exception while the task has not ran to completion
Resolution Note (2023.1.X):
This is actually a fix coming from a Mono update to align await behavior with CoreCLR. Any "await" statement that is not already completed have there continuation scheduled using the current execution context, even if the SetResult or SetException call raising completion happens from the same thread.
So in that case, the test check for the exception while the task has not ran to completion