Search Issue Tracker
By Design
Votes
1
Found in
2020.1.0a4
2020.1.4f1
2020.2
Issue ID
1278032
Regression
Yes
An error directs to a wrong line in the script when the error is thrown in the Console
How to reproduce:
1. Open user's attached "arrayerror" project
2. Open the "SampleScene" Scene
3. Enter the Play Mode
Expected results: The error in the Console shows that the error is in line 14
Actual results: The error in the Console shows that the error is in line 17
Reproducible with: 2020.1.0a4, 2020.1.6f1, 2020.2.0b3
Not reproducible with: 2018.4.27f1, 2019.4.10f1, 2020.1.0a3
Notes:
- The error will show the closing bracket of the function in which the error has occurred
- The issue seems to appear only on the "Index out of range" error
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
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- GC.Alloc called by HDRenderPipeline.LensFlareMergeOcclusionDataDrivenPass() when playing the default HDRP Sample Template project
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
Resolution Note:
Source code line numbers in managed stack traces might be wrong when the Unity editor is compiling code in release mode (which is the default mode since 2020.1a4).
To get proper source code line numbers, you can change the editor back to debug compilation mode. Check out the little "bug" icon in the lower right of the editor. If to click the down arrow next to it, that will pop up a window which indicates the current mode and allows you to change it. Change to debug mode for correct source code line numbers in stack traces.