Reproduction steps:
1. Open the attached “repro-project“
2. In the Project window find and open the “Assets/Invector@MeleeCombat_Upperbody.controller“ Animator Controller
3. In the Animator window create an Empty State on the Base Layer (Right-click on the layer → Create State → Empty)
4. Delete the newly created Empty State
5. Observe the crash
Reproducible with: 2021.3.36f1, 2022.3.21f1, 2023.2.13f1, 2023.3.0b10
Not reproducible with: 2022.3.18f1
Regressed in: 2022.3.19f1
Reproduced on: Windows 10
Not reproducible on: No other environment tested
First few lines of the stack trace:
0x00007ff6c3ea8232 (Unity) AnimatorStateMachine::RemoveTransitionsWithDeletingObject
0x00007ff6c3ea8232 (Unity) AnimatorStateMachine::RemoveTransitionsWithDeletingObject
0x00007ff6c3ea7a93 (Unity) AnimatorStateMachine::RemoveState
0x00007ff6c27beaf4 (Unity) AnimatorStateMachine_CUSTOM_RemoveStateInternal
0x000002b9f3583d54 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.Animations.AnimatorStateMachine:RemoveStateInternal (UnityEditor.Animations.AnimatorStateMachine,UnityEditor.Animations.AnimatorState)