Search Issue Tracker

Fixed in 2022.2.X

Votes

0

Found in

2022.2

2022.2.0a4

Issue ID

1402247

Regression

Yes

[IMGUI] IndexOutOfRangeExceptions thrown when trying to add the first item in empty icon list

IMGUI

-

How to reproduce:
1. Open attached project (or add Mobile Notifications package to new project)
2. Go to Project settings and open Mobile Notifications panel
3. Under Android, click + sign to add notification icon
4. Then click - sign, then +
6. Observe Console

Expected result: No errors in console
Actual result: Errors in console

Reproducible with: 2022.2.0a4
Does not reproduce: 2022.1.0b7

Note: Closing Project settings window and reopening fixes the issue, reproducible on both windows and mac

Errors:
IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:968)
UnityEditorInternal.ReorderableList.DoList (UnityEngine.Rect rect, UnityEngine.Rect visibleRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:740)
UnityEditorInternal.ReorderableList.DoList (UnityEngine.Rect rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:724)
Unity.Notifications.NotificationSettingsProvider.OnGUI (System.String searchContext) (at Library/PackageCache/com.unity.mobile.notifications@2.0.0/Editor/NotificationSettingsProvider.cs:273)
UnityEditor.SettingsWindow.DrawControls () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:437)
UnityEditor.SettingsWindow.DrawSettingsPanel () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:415)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:351)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.