Search Issue Tracker
Duplicate
Votes
0
Found in
2022.1.0b6
Issue ID
1400437
Regression
Yes
UIToolkit with UIDocument - InvalidOperationException
1. What happened
- Changing any value to any VisualElement in UIBuilder or via scripts creates an error (Invalid Operation Exception, see the stacktrace below).
2. How can we reproduce it using the example you attached
- Open the scene file
- Select UIDocument in the scene, open Test (Visual Tree Asset) so UI Builder opens up
- Do anything to any element (Label) in the tree, e.g. change opacity, position, apply any style (via editor or style script) and the error message will appear in the console
This error occours in Unity 2022.1.b5 and 2022.1.b6. No errors with 2021.2.10f1 version.
Stacktrace:
InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () (at <cdc4992cc04a4e77a24a09cd121af77b>:0)
System.Collections.Generic.List`1+Enumerator[T].MoveNext () (at <cdc4992cc04a4e77a24a09cd121af77b>:0)
UnityEngine.UIElements.UIElementsRuntimeUtility.UpdateRuntimePanels () (at <9fb9706855a847a1926259ab0baf1b3c>:0)
UnityEngine.UIElements.UIElementsRuntimeUtilityNative.UpdateRuntimePanels () (at <05a8bc2f25e84bdebc90d31147b4881d>:0)
Note: We tried on Windows and it looks like its affecting MAC only.
Comments (2)
-
manuelgoellnitz
Mar 22, 2022 08:32
If this is a duplicate, where is the other ticket with the same bug?
A link would be nice.I have this problem on WebGL, so it seams not MAC only and on Unity 2021.2.15
-
Nanomid
Feb 24, 2022 23:05
I have this issue constantly.
InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () (at <7b935204f5ff4bcab44b3b0ebca330bf>:0)
System.Collections.Generic.List`1+Enumerator[T].MoveNext () (at <7b935204f5ff4bcab44b3b0ebca330bf>:0)
UnityEngine.UIElements.UIElementsRuntimeUtility.UpdateRuntimePanels () (at <a40fb3db3ff84d2d9bf85ec84d6c5573>:0)
UnityEngine.UIElements.UIElementsRuntimeUtilityNative.UpdateRuntimePanels () (at <4e881c99ae1a43bfa47861981e2726e0>: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
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
- Editor freezes after some time when using NavMeshQuery::Raycast
This is a duplicate of issue #1402588