Search Issue Tracker
Fixed
Fixed in 6000.0.17f1, 7000.0.0a1
Votes
0
Found in
6000.0.13f1
7000.0.0a1
Issue ID
UUM-76826
Regression
Yes
ArgumentOutOfRangeException is thrown when Deleting StyleSheet in Context or Isolation with Keyboard
*Steps to reproduce:*
# Create or open any Project with the UI Toolkit installed
# Create a "UI Document" Asset and open it
# Add any UI Element to the Hierarchy
# Right click it and select "Create Template" and select it
# Create and attach a StyleSheet with a Selector added to it
# Right click the Template in the Hierarchy and select "Open Instance in Isolation" or "Open Instance in Context"
# In the StyleSheets section, select a greyed out .USS file
# Press Delete via keyboard
*Actual results:* "ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index" is thrown in Console
*Expected results:* No Errors are thrown
*Reproducible with versions:* 2023.2.14f1, 2023.2.20f1, 2023.3.0b10, 6000.0.13f1
*Not reproducible with versions:* 2021.3.40f1, 2022.3.40f1, 2023.1.20f1, 2023.2.13f1, 2023.3.0b9
*Tested on (OS):* macOS Sonoma, Windows 11
*Error message:*
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <20a025bba6874f73adca28fec451f638>:0)
Unity.UI.Builder.BuilderDocumentOpenUXML.RemoveStyleSheetFromLists (System.Int32 ussIndex) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderDocumentOpenUXML.RemoveStyleSheetFromDocument (System.Int32 ussIndex) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderDocument.RemoveStyleSheetFromDocument (System.Int32 ussIndex) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderAssetUtilities.RemoveStyleSheetFromAsset (Unity.UI.Builder.BuilderDocument document, System.Int32 ussIndex) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderStyleSheetsUtilities.RemoveUSSFromAsset (Unity.UI.Builder.BuilderPaneWindow paneWindow, Unity.UI.Builder.BuilderSelection selection, UnityEngine.UIElements.VisualElement clickedElement) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderCommandHandler.DeleteElement (UnityEngine.UIElements.VisualElement element) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderCommandHandler.DeleteSelection () (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
Unity.UI.Builder.BuilderCommandHandler.OnDelete (UnityEngine.UIElements.KeyDownEvent evt) (at <dfb6f584aa494374b9127edd7bcf5d6d>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToFocusedElementOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.KeyboardEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <aff7113d094045d8bc63c60169e8e899>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <98b89b20e7fa498f86e3aee402e1f36f>:0)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Select Preset "None" icon changes after switching tabs
- [Android] Crash when using xxHash3 and targeting the ARMv7 Architecture with IL2CPP Scripting Backend
- GameObject reference in a Script Component becomes missing when unpacking a variant of another Prefab variant
- Project Settings vertical separator position is not synchronized with the mouse position when dragging it horizontally
- Crash on PhysicsDebugDraw::SelectFiltering::Update when entering play mode with Physics Debug window docked and unfocused
Add comment