Search Issue Tracker
Not Reproducible
Votes
5
Found in [Package]
1.4.11f2
Issue ID
UVSB-656
Regression
No
UnityEngine.UI.Selectable -> IndexOutOfRangeException: Index was outside the bounds of the array.
----
Hello,
I randomly get an error saying I need to rebuild the bolt unit options. And after that I get a bunch of these errors:
IndexOutOfRangeException: Index was outside the bounds of the array.
(wrapper stelemref) System.Object.virt_stelemref_class(intptr,object)
UnityEngine.UI.Selectable.OnEnable () (at C:/Program Files/Unity/Hub/Editor/2019.3.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Selectable.cs:493)
They happen on a new empty scene with just UI Button or Input Source for example.
If I revert the project to collab version, then build bolt unit options the error comes back.
Comments (5)
-
chris_schubert
Dec 10, 2021 20:49
I get it most frequently when using TextMeshPro buttons.
My workaround:
[InitializeOnLoadAlways]
public class DummySelectable : Selectable
{
static DummySelectable()
{
if (s_SelectableCount < 0)
{
s_SelectableCount = 0;
}
}
} -
triangle4studios
May 06, 2021 03:08
Is Accompanied by this error:
IndexOutOfRangeException: Index was outside the bounds of the array.
(wrapper stelemref) System.Object.virt_stelemref_class(intptr,object)
UnityEngine.UI.Selectable.OnDisable () (at C:/Program Files/Unity/Hub/Editor/2019.4.3f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Selectable.cs:526)
UnityEngine.GameObject:SetActive(Boolean)
ActorMenu:SetBackPackInitialPositions() (at Assets/Game/SCRIPT/ActorMenu.cs:1182)
ActorMenu:OnEnable() (at Assets/Game/SCRIPT/ActorMenu.cs:787)as well as
IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEngine.UI.Selectable.OnDisable () (at C:/Program Files/Unity/Hub/Editor/2019.4.3f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Selectable.cs:523)
UnityEngine.GameObject:SetActive(Boolean)
ActorMenu:SetBackPackInitialPositions() (at Assets/Game/SCRIPT/ActorMenu.cs:1182)
ActorMenu:OnEnable() (at Assets/Game/SCRIPT/ActorMenu.cs:787)Happens when updating a script while the game is running.
Is resolved by restarting unity, but occurs again within 15-20 minutes.
Cannot be resolved without restarting the editor.Can be avoided by not updating a script until the game is not running. However many people use live script updating, so this would ruin said feature.
-
Gaia_vp
Jan 22, 2021 15:32
Hi DPOTUZNIK
would you mind pitting some steps to reproduce, we will appreciate it a lot
Thanks so much..!!! -
dpotuznik
Jan 20, 2021 12:21
me too 2020.2.1f1
-
Synamon
Sep 22, 2020 15:59
2019.4.1.f1
me too
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
Cannot Reproduce, but if the users reporting this issue can provide steps to reproduce, we'll re-open it.