How to reproduce:
- Create and open a new project
- Create a new UI Toolkit → UI Document in the Project tab
- Double-click it to open it in UI Builder
- Add two Visual Elements and select the first added Visual Element
- In the top right of the UI Builder’s Inspector, rename the Visual Element to anything
- Without pressing Enter, press CTRL + S to save the changes
- Observe the Console
Expected result: The new name is validated and saved automatically
Actual result: A UI Document parsing error dialog box pops up, and when dismissed, two “Index was outside of bounds of the array” errors are thrown
Reproducible in: 6000.0.0b12, 6000.0.62f1, 6000.2.11f1, 6000.3.0b9, 6000.4.0a4
Not reproducible in: 6000.0.0b11
Reproduced on: Windows 11 Pro (24H2)
Not reproduced on: No other environment tested
Notes:
- Afterward, the UXML becomes unusable - no element can be added to the Hierarchy, and “Index was outside of bounds of the array” errors are constantly being spewed out on any change made to the UXML
- Opening the UXML after the reproduction always throws one “Invalid UXML or USS: System.IndexOutOfRangeException: Index was outside the bounds of the array.” error
- The problem cannot be reproduced if the project is created in 6000.2.0a4 for some reason. Only downgrading from 6000.4.0a4 (and maybe some other versions) will yield actual results