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
- “Screen position out of view frustum...” errors are thrown when zooming out in the Scene view after creating UI GameObject
- CurveTexture is not being released when unloading AssetBundle containing a Scene with ColorCurves post-processing component in Global Volume
- Crash on ExtractActiveCasterInfo when navigating the scene view in a project with specific lighting data
- Build Profile name increments when numeric suffix is removed from duplicate Profile name
- "Unrecognized block header in profiler data file, stopping deserialization" error is shown and no more profiler data is recorded when the Player is connected and profiler recording is enabled/disabled few times
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0b7, 2022.2.0a4