Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.4.0f1
2019.1.0a1
2019.2.0a1
2019.3.0a1
Issue ID
1154845
Regression
No
Only the first Catch Block catches Exceptions in Builds when using multiple Catch Blocks in combination with "when" Keyword
To reproduce:
1. Download attached "catchmeifyoucan.zip" project and open in Unity
2. Open "SampleScene" scene
3. Enter to Play mode
4. Press "TestWhenInSecondCatchBlock", "TestWhenInFirstCatchBlock", "TestWhenInFirstCatchBlockExceptionForSecond" and "TestNoWhenUsageCatchSecondBlock" buttons
5. Observe that all Exceptions are cought
6. Exit from Play mode
7. Build for Standalone (IL2CPP), iOS or Android (IL2CPP)
8. Deploy the Xcode project to the iOS device, run Standalone Build or deploy .apk on Android device
9. Press "TestWhenInSecondCatchBlock", "TestWhenInFirstCatchBlock", "TestWhenInFirstCatchBlockExceptionForSecond" and "TestNoWhenUsageCatchSecondBlock" buttons
Expected Results: All Exceptions are caught like in a Unity Editor
Actual Results: The Buttons labeled "TestWhenInSecondCatchBlock" and "TestWhenInFirstCatchBlockExceptionForSecond" do not catch the Exceptions that are thrown
Notes:
- This issue appears on Standalone (IL2CPP), iOS and Android (IL2CPP)
- On Mono Scripting Backend everything seems to work as Expected
Tested with:
- iPhone 8 Plus, iOS: 12.0 - Reproduced
- Huawei P20 Pro (CLT-L29), Android 8.1.0, CPU: HiSilicon Kirin 970, GPU: Mali-G72 - Reproduced
Reproduced on Unity 2017.4.0f1, 2017.4.27f1, 2018.3.14f1, 2018.4.1f1, 2019.1.4f1, 2019.2.0b3 and 2019.3.0a4
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
- [tvOS] "EXC_BAD_ACCESS" error is thrown when Painter2D.ClosePath is called
- Bad Naming Convention in Shortcuts Window for Sprite Shape Editing
- Bad Naming Convention in Shortcuts Window for Shader Graph
- Bad Naming Convention in Shortcuts Window for Particle System
- "Cameras" tooltip is too far from the window
Resolution Note:
IL2CPP currently does not support exception filters in C# code. Work around this problem by calling the code which would execute in the exception filters directly in catch blocks.