Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2022.1.X
Votes
1
Found in
2022.1
2022.1.0b2
Issue ID
1389052
Regression
Yes
InvalidOperationException thrown after undoing changes while Animation is playing
How to reproduce:
1. Open attached project
2. Open 'Edit while paused' scene
3. Select Human in Inspector
4. In VeryAnimation tab select Focus Animation Window, then Edit Animation
5. In VA Control window Hierarchy select Spine
6. In VA Editor window Selection click anywhere on the Spine Twist Left-Right slider and then undo once (to make sure undo works for Change muscle action)
7. In Animation window Play animation
8. In VA Editor window Selection click anywhere on the same slider and then undo once
9. Observe Console
InvalidOperationException: Sequence contains no elements
System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <f1160d35ca3b401a8765abde375a7765>:0)
UnityEditor.Graphs.AnimatorControllerTool.UpdateStateMachineSelection () (at /Users/bokken/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1012)
UnityEditor.Graphs.AnimatorControllerTool.RebuildGraph (System.Boolean updateSelection) (at /Users/bokken/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:876)
UnityEditor.Graphs.AnimatorControllerTool.UndoRedoPerformed () (at /Users/bokken/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:801)
UnityEditor.Undo.Internal_CallUndoRedoPerformed () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Undo/Undo.bindings.cs:289)
Reproduced with: 2022.1.0a5, 2022.1.0b2
Does not reproduce with: 2021.2.7f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment