Search Issue Tracker
Fixed in 2021.3.X
Votes
0
Found in
2021.2.11f1
2021.3.1f1
Issue ID
1420033
Regression
Yes
[UI Builder] Invalid Operation Exception when adding new elements to Hierarchy
Reproduction steps:
1. Open the project attached in report
2. Open SampleScene
3. In Hierarchy select UI
4. Double click the source asset to open it in UI Builder
5. Drag a text field into Hierarchy
Expected result: there are no errors in the console
Actual result: "InvalidOperationException: Collection was modified; enumeration operation may not execute." errors are thrown
Reproducible with: 2021.2.11f1, 2021.3.1f1
Not reproducible with: 2021.2.10f1, 2022.1.0b16, 2022.2.0a11
Could not test with 2019.4, 2020.3 (downgrading issues)
Error:
InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () (at <6073cf49ed704e958b8a66d540dea948>:0)
System.Collections.Generic.List`1+Enumerator[T].MoveNext () (at <6073cf49ed704e958b8a66d540dea948>:0)
UnityEngine.UIElements.UIElementsRuntimeUtility.UpdateRuntimePanels () (at <a1bb4781672a473da2508a63172fb75e>:0)
UnityEngine.UIElements.UIElementsRuntimeUtilityNative.UpdateRuntimePanels () (at <15a98e5804a14d9abff4fca9f4f7603a>:0)
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
- Long Prefab save times when using Unity 2022.2 and higher
- Console displays error "UnityException: Creating asset at path Assets/Scenes/ .scenetemplate failed." during scene template saving
- "Development Build" watermark is shown in non-development UWP release builds
- Console errors appear when the Inspector is set to Debug and a GameObject is selected
- A script public variable value is not used when set in the Inspector window
Resolution Note (fix version 2021.3):
Fixed in 2021.3.2f1