Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.2.0b8
2021.2.0f1
2022.1.0a7
Issue ID
1376197
Regression
Yes
Player crashes when calling File.OpenRead and catching exception in async methods
How to reproduce:
1. Open the attached project "OpenReadCrash.zip"
2. Make sure the Scripting Backend is set to IL2CPP in the Player settings (Edit > Project Settings > Player)
3. File > Build And Run
Expected result: Player doesn't crash on exception
Actual result: Player crashes
Reproducible with: 2021.2.0b8, 2021.2.3f1, 2022.1.0a7, 2022.1.0a15
Not reproducible with: 2019.4.32f1, 2020.3.23f1, 2021.2.0b7, 2022.1.0a6
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
- [Ubuntu] Mouse cursor is set box select mode after exiting VFX Graph's Rename Context function
- Unrecognized identifier DECLARE_STACK_CB error is thrown when VirtualTexture Property is used with Custom RenderTexture target
- SpriteShapeController.OnWillRenderObject() is ~20 ms when using SpriteShapeController.BakeMesh() and never updating the spline
- Editor freezes briefly when "multi-selecting" TextMeshPro GameObjects In the Hierarchy window in Prefab Mode, if 5 or more Inspector windows are open
- OnEndDrag event not triggered when losing Editor focus during simultaneous Left and Right mouse drag
Resolution Note (2022.1.X):
Bug with C++ compiler that we are not able to work around.
The problem occurs when there are two catch blocks in a row with the same content and a using statement is inside the try block. If the catch block catches a System.Exception and then checks the for the DirectoryNotFoundException or FileNotFoundException types explicitly, this problem will not occur.