Search Issue Tracker
Fixed in 2020.2.X
Votes
0
Found in
2020.1
2020.1.4f1
2020.2
Issue ID
1334046
Regression
No
NativeArray.AsReadOnly will not throw a IndexOutOfRangeException when trying to access an element that is out of bounds
How to reproduce:
1. Open the attached project "NativeArray.zip"
2. Open SampleScene
3. Click Play
Expected result: A IndexOutOfRangeException is thrown
Actual result: No Exceptions are thrown and a value is logged to the Console
Reproducible with: 2020.1.0a21, 2020.2.0a19
Not reproducible with: 2020.2.0a20, 2020.3.9f1, 2021.1.8f1, 2021.2.0a17
Could not test with: 2018.4.34f1, 2019.4.26f1, 2020.1.0a20 (No AsReadOnly method)
Workaround:
Notes:
1.
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
- [Quest] Pitch Shifter causes audio degradation on Quest 2 devices when sped up
- "GUI Error: Invalid GUILayout" and "NullReferenceException" are thrown when adding Scenes to "Scenes in Baking Set" in Adaptive Probe Volumes
- Inspector window not updating when switching GameObjects in Play Mode while having a VR headset connected
- "UnityException: GetName can only be called from the main thread." erors are thrown when the Shortcuts window is opened and entering Play Mode with a shortcut
- [Android] Light2D visuals stacking over frames when using RenderGraph
Resolution Note (fix version 2020.2):
Does no longer reproduce with: 2020.2.0a20