Search Issue Tracker
Fixed in 2022.1.X
Duplicate in 2021.3.X
Votes
0
Found in
2021.2.0b1
2021.3
2021.3.2f1
Issue ID
1426702
Regression
Yes
InvalidOperationException is thrown when undoing changes while Animator window is opened
Reproduction steps:
1. Open the attached 'Test' project
2. Go to the 'Window -> Animation -> Animator'
3. Perform any undo action (ctrl + z or command + z) in the Editor
Expected result: No errors are in the Console
Actual result: 'InvalidOperationException: Sequence contains no elements' error is in the Console
Reproducible with: 2021.2.0b1, 2021.3.2f1, 2022.1.0b6, 2022.2.0a3
Not reproducible with: 2019.4.38f1, 2020.3.34f1, 2021.2.0a19, 2022.1.0b7, 2022.1.0b16, 2022.2.0a4, 2022.2.0a13
Full error:
InvalidOperationException: Sequence contains no elements
System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
UnityEditor.Graphs.AnimatorControllerTool.UpdateStateMachineSelection () (at <810d338ac54a4923957e242981b232ec>:0)
UnityEditor.Graphs.AnimatorControllerTool.RebuildGraph (System.Boolean updateSelection) (at <810d338ac54a4923957e242981b232ec>:0)
UnityEditor.Graphs.AnimatorControllerTool.UndoRedoPerformed () (at <810d338ac54a4923957e242981b232ec>:0)
UnityEditor.Undo.Internal_CallUndoRedoPerformed () (at <a017e354f3154926a5617fbac3a64fcc>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
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
- Test Runner’s vertical scrollbar overlaps with the up and down arrows and upper toolbar tabs when the window is minimized
- The Input Field view is not updated when deleting lines of text
- The scrollbar does not respect empty lines in the Input Field
- “Texture Atlas Viewer“ button text overlaps another button when the UI Toolkit Debugger is narrowed
- Thresholds are no longer automatically calculated after deleting Motion fields in Blendtrees
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0b7, 2022.2.0a4