Search Issue Tracker
In Progress
Under Consideration for 2.6.X
Fix In Review for 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
- "Shader warning in 'Hidden/HDRP/DownsampleDepth'" warnings are thrown after building a project
- Scene is not rendered and appears black when the Custom Renderer Feature is utilized
- [ShortcutManager] The Context Menu is not updated in the Shortcuts menu when resolving a Binding Conflict
- [Quest] Foveation Level is 0 when SRP Foveation is enabled
- Freeze when displaying text with "-T" in Play mode
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.