Search Issue Tracker
Duplicate
Votes
0
Found in
5.6.0b5
Issue ID
900539
Regression
Yes
IndexOutOfRangeException: Array index is out of range error when disabling Mask component from an Image gameobject
1. Open the "900515 repro.zip"
2. In Hierarchy window, navigate to Canvas->Image
3. Disable "Mask (script)" component
4. Observe the console
Result: IndexOutOfRangeException: Array index is out of range.
UnityEditor.InspectorWindow.EditorHasLargeHeader (Int32 editorIndex) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1265)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1072)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1008)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:359)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Expected result: no errors are thrown
Reproduced with: 5.6.0f3, 2017.1.0b1
Did not reproduce with: 5.5.3p1
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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
hashashin
Jun 08, 2017 19:26
Not sure if I am with my eyes hurting from using Unity on my 4K Linux Laptop, but I can not find the link to the ticket this is a duplicate of.
Well, having this same issue when adding and removing components from an editor script. I have a component that adds and removes sphere colliders accordingly with an integer value (number of colliders). Every time I add or remove colliders, I get this same error message (although it seems to work...)