Search Issue Tracker

Fixed

Fixed in 2021.3.6f1

Votes

0

Found in

2021.3.0f1

Issue ID

UUM-1853

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

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.