Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.2.21f1
2020.2
Issue ID
1225725
Regression
No
[IL2CPP] Player crashes when dividing by zero even if the DivideByZeroException handled in a try block
How to reproduce:
1. Open the attached project
2. Build the project
3. Play the built project
4. In the Player, press the "Force error" button
Expected result: An "DivideByZeroException" exception is caught
Actual result: Player crashes
Reproducible with: , 2018.4.19f1, 2019.3.5f1, 2020.1.0b1, 2020.2.0a2
Couldn't test with: 2017.4.38f1 (IL2CPP not supported)
Note: DivideByZeroException handling does not stop the crash
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
- The default layout file gets corrupted when the project is saved and closed after running a specific Test Runner test
- Cameras overlay sometimes show “No Cameras” for a split second instead of “Main Camera” when clicked to move the overlay
- Sprite Mode defaults to "Multiple" instead of "Single" when switching the Texture Type to "Sprite (2D and UI)"
- Adaptive Probe Volume “Open” button closes the existing RPAsset window and opens a new RPAsset window instead of focusing the existing RPAsset window
- A specific project freezes when Content Size Fitter's Horizontal Fit is set to "Min Size" and it contains double ellipses followed by a CJK character
Resolution Note:
IL2CPP does not emit checks for divide by zero cases by default, as they are expensive both for code size and run time performance. However, you can add them to specific methods or classes if they are required. See the documentation here for details: https://docs.unity3d.com/Manual/IL2CPP-CompilerOptions.html