Search Issue Tracker
In Progress
Fix In Review for 2.6.4
Fixed in 3.0.6
Votes
1
Found in [Package]
2.6.3
3.0.5
Issue ID
XRIT-184
Regression
No
[XRIT] "IndexOutOfRangeException: Index was outside the bounds of the array" exception is printed when swapping between XRHands and Controllers after interacting with UIToolkit objects
Steps to reproduce:
1. Open the attached user's project "VR Test 3.zip"
2. Open the modified "HandsDemoScene.unity" Scene
3. Enable Meta Link with Quest 3 and enter Play Mode
4. Use the controllers a bit with the UI ScrollView GameObject
5. Lay the controllers down and use the handtracking for a while, touch your fingers with our thumb to generate input events
6. Repeat step 4 and 5 until the errors start appearing
Expected results: No exception is printed
Actual results: "IndexOutOfRangeException: Index was outside the bounds of the array" exception is printed when swapping between XRHands and Controllers after interacting with UIToolkit objects
Reproducible with: XRIT 2.6.3 - 3.0.5 (2022.3.42f1, 6000.0.15f1)
Could not test on 2021.3.42f1 due to project errors after downgrading
Reproducible with these devices
VLNQA00609 - Oculus Quest 3 (Quest 3), CPU: Snapdragon XR2 Gen 2 (SM8550), GPU: Adreno 740, OS: 12
VLNQA00415 - Oculus Quest 2 (Quest 2), CPU: Snapdragon XR2, GPU: Adreno 650, OS: 12
Notes:
-According to the user: The pointerId that is used by the eventsystem and the ui is constantly increasing, probalby when the hands or the controllers are detected new. And when the pointerId reaches 32, the errorspam begins.
-Exception:
IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEngine.UIElements.PointerCaptureHelper.GetCapturingElement (UnityEngine.UIElements.IPanel panel, System.Int32 pointerId) (at <da837e40d79248fa84e5fd0424695f60>:0)
UnityEngine.UIElements.PanelRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] resultAppendList) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/UIElements/PanelRaycaster.cs:95)
UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] raycastResults) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:276)
UnityEngine.XR.Interaction.Toolkit.UI.UIInputModule.PerformRaycast (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@3.0.5/Runtime/UI/UIInputModule.cs:308)
UnityEngine.XR.Interaction.Toolkit.UI.UIInputModule.ProcessTrackedDevice (UnityEngine.XR.Interaction.Toolkit.UI.TrackedDeviceModel& deviceState, System.Boolean force) (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@3.0.5/Runtime/UI/UIInputModule.cs:641)
UnityEngine.XR.Interaction.Toolkit.UI.XRUIInputModule.DoProcess () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@3.0.5/Runtime/UI/XRUIInputModule.cs:562)
UnityEngine.XR.Interaction.Toolkit.UI.UIInputModule.Update () (at ./Library/PackageCache/com.unity.xr.interaction.toolkit@3.0.5/Runtime/UI/UIInputModule.cs:147)
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
- Prefab override popup is cropped/positioned incorrectly when more than one display is used and a higher display Scale is set
- Opening a dropdown on a small screen results in its instant closing when mouse cursor is pressed where the dropdown is going to be opened
- Only "ArgumentNullException: Value cannot be null" is displayed instead of all the actual errors when opening a project with numerous compilation errors
- MultiColumnListView and MultiColumnTreeView do not change selection on first input when focus is set by code
- SerializedProperty.DataEquals is returning false when SerializedProperty.EqualContents return true
Resolution Note (fix version 3.0.6):
Fixed an issue where Interactors that were subscribed to hover events were not getting Exit events when the UI object being hovered is disabled or destroyed in the scene.
The pointerID system was updated to reuse the RegisteredInteractor classes and pointer IDs instead of using a rolling pointerID. I went with a boolean flag to tell the system when the registered interactor was active or not so that it would only update those interactors when needed.
Resolution Note (fix version 2.6.4):
Fixed an issue where Interactors that were subscribed to hover events were not getting Exit events when the UI object being hovered is disabled or destroyed in the scene.
The pointerID system was updated to reuse the RegisteredInteractor classes and pointer IDs instead of using a rolling pointerID. I went with a boolean flag to tell the system when the registered interactor was active or not so that it would only update those interactors when needed.