Repository: godot
Issue: Crash after AnimationMixer: couldn't resolve track: warning
Labels: bug,topic:editor,needs testing,crash,topic:animation

### Tested versions

v4.3.stable.mono.official [77dcf97d8]

### System information

Godot v4.3.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - GeForce MX250 - Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 Threads)

### Issue description

Under some specific conditions, the editor crashes, which may be related to this warning
WARNING: AnimationMixer: '', couldn't resolve track:  ''. This warning can be disabled in Project Settings.
     at: AnimationMixer::_update_caches (scene\animation\animation_mixer.cpp:668)

After some testing, I'm guessing: after triggering this warning in some way, switching to a scene without an AnimationPlayer and then running the game triggers this crash


The crash stacktrace:
```
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] HashMap<StringName,AnimationMixer::AnimationData,HashMapHasherDefault,HashMapComparatorDefault<StringName>,DefaultTypedAllocator<HashMapElement<StringName,AnimationMixer::AnimationData> > >::_lookup_pos (D:\Data\Godot\Code\SpaceEngine\core\templates\hash_map.h:100)
[1] HashMap<StringName,AnimationMixer::AnimationData,HashMapHasherDefault,HashMapComparatorDefault<StringName>,DefaultTypedAllocator<HashMapElement<StringName,AnimationMixer::AnimationData> > >::has (D:\Data\Godot\Code\SpaceEngine\core\templates\hash_map.h:311)
[2] AnimationMixer::get_animation (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_mixer.cpp:392)
[3] AnimationPlayerEditor::_current_animation_changed (D:\Data\Godot\Code\SpaceEngine\editor\plugins\animation_player_editor_plugin.cpp:1336)
[4] call_with_variant_args_helper<AnimationPlayerEditor,String const &,0> (D:\Data\Godot\Code\SpaceEngine\core\variant\binder_common.h:303)
[5] call_with_variant_args<AnimationPlayerEditor,String const &> (D:\Data\Godot\Code\SpaceEngine\core\variant\binder_common.h:418)
[6] CallableCustomMethodPointer<AnimationPlayerEditor,String const &>::call (D:\Data\Godot\Code\SpaceEngine\core\object\callable_method_pointer.h:104)
[7] Callable::callp (D:\Data\Godot\Code\SpaceEngine\core\variant\callable.cpp:58)
[8] Object::emit_signalp (D:\Data\Godot\Code\SpaceEngine\core\object\object.cpp:1188)
[9] Node::emit_signalp (D:\Data\Godot\Code\SpaceEngine\scene\main\node.cpp:3868)
[10] Object::emit_signal<StringName> (D:\Data\Godot\Code\SpaceEngine\core\object\object.h:936)
[11] AnimationPlayer::set_assigned_animation (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_player.cpp:557)
[12] AnimationMixer::_blend_process (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_mixer.cpp:1693)
[13] AnimationMixer::_process_animation (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_mixer.cpp:943)
[14] AnimationPlayer::seek_internal (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_player.cpp:611)
[15] AnimationPlayer::seek (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_player.cpp:617)
[16] AnimationMixer::reset (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_mixer.cpp:2108)
[17] AnimationMixer::apply_reset (D:\Data\Godot\Code\SpaceEngine\scene\animation\animation_mixer.cpp:2140)
[18] _reset_animation_mixers (D:\Data\Godot\Code\SpaceEngine\editor\editor_node.cpp:1810)
[19] EditorNode::_save_scene (D:\Data\Godot\Code\SpaceEngine\editor\editor_node.cpp:1841)
[20] EditorNode::_save_all_scenes (D:\Data\Godot\Code\SpaceEngine\editor\editor_node.cpp:1989)
[21] EditorNode::_menu_option_confirm (D:\Data\Godot\Code\SpaceEngine\editor\editor_node.cpp:2781)
[22] EditorNode::_menu_option (D:\Data\Godot\Code\SpaceEngine\editor\editor_node.cpp:1424)
[23] EditorNode::try_autosave (D:\Data\Godot\Code\SpaceEngine\editor\editor_node.cpp:1946)
[24] EditorRunBar::_run_scene (D:\Data\Godot\Code\SpaceEngine\editor\gui\editor_run_bar.cpp:231)
[25] EditorRunBar::play_current_scene (D:\Data\Godot\Code\SpaceEngine\editor\gui\editor_run_bar.cpp:286)
[26] EditorRunBar::_play_current_pressed (D:\Data\Godot\Code\SpaceEngine\editor\gui\editor_run_bar.cpp:145)
[27] call_with_variant_args_helper<EditorRunBar> (D:\Data\Godot\Code\SpaceEngine\core\variant\binder_common.h:308)
[28] call_with_variant_args<EditorRunBar> (D:\Data\Godot\Code\SpaceEngine\core\variant\binder_common.h:418)
[29] CallableCustomMethodPointer<EditorRunBar>::call (D:\Data\Godot\Code\SpaceEngine\core\object\callable_method_pointer.h:104)
[30] Callable::callp (D:\Data\Godot\Code\SpaceEngine\core\variant\callable.cpp:58)
[31] Object::emit_signalp (D:\Data\Godot\Code\SpaceEngine\core\object\object.cpp:1188)
[32] Node::emit_signalp (D:\Data\Godot\Code\SpaceEngine\scene\main\node.cpp:3868)
[33] Object::emit_signal<> (D:\Data\Godot\Code\SpaceEngine\core\object\object.h:936)
[34] BaseButton::_pressed (D:\Data\Godot\Code\SpaceEngine\scene\gui\base_button.cpp:138)
[35] BaseButton::on_action_event (D:\Data\Godot\Code\SpaceEngine\scene\gui\base_button.cpp:169)
[36] BaseButton::gui_input (D:\Data\Godot\Code\SpaceEngine\scene\gui\base_button.cpp:69)
[37] Control::_call_gui_input (D:\Data\Godot\Code\SpaceEngine\scene\gui\control.cpp:1590)
[38] Viewport::_gui_call_input (D:\Data\Godot\Code\SpaceEngine\scene\main\viewport.cpp:1570)
[39] Viewport::_gui_input_event (D:\Data\Godot\Code\SpaceEngine\scene\main\viewport.cpp:1836)
[40] Viewport::push_input (D:\Data\Godot\Code\SpaceEngine\scene\main\viewport.cpp:3259)
[41] Window::_window_input (D:\Data\Godot\Code\SpaceEngine\scene\main\window.cpp:1682)
[42] call_with_variant_args_helper<Window,Ref<InputEvent> const &,0> (D:\Data\Godot\Code\SpaceEngine\core\variant\binder_common.h:303)
[43] call_with_variant_args<Window,Ref<InputEvent> const &> (D:\Data\Godot\Code\SpaceEngine\core\variant\binder_common.h:418)
[44] CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call (D:\Data\Godot\Code\SpaceEngine\core\object\callable_method_pointer.h:104)
[45] Callable::callp (D:\Data\Godot\Code\SpaceEngine\core\variant\callable.cpp:58)
[46] Callable::call<Ref<InputEvent> > (D:\Data\Godot\Code\SpaceEngine\core\variant\variant.h:875)
[47] DisplayServerWindows::_dispatch_input_event (D:\Data\Godot\Code\SpaceEngine\platform\windows\display_server_windows.cpp:3557)
[48] DisplayServerWindows::_dispatch_input_events (D:\Data\Godot\Code\SpaceEngine\platform\windows\display_server_windows.cpp:3528)
[49] Input::_parse_input_event_impl (D:\Data\Godot\Code\SpaceEngine\core\input\input.cpp:775)
[50] Input::flush_buffered_events (D:\Data\Godot\Code\SpaceEngine\core\input\input.cpp:1056)
[51] DisplayServerWindows::process_events (D:\Data\Godot\Code\SpaceEngine\platform\windows\display_server_windows.cpp:3025)
[52] OS_Windows::run (D:\Data\Godot\Code\SpaceEngine\platform\windows\os_windows.cpp:1675)
[53] widechar_main (D:\Data\Godot\Code\SpaceEngine\platform\windows\godot_windows.cpp:181)
[54] _main (D:\Data\Godot\Code\SpaceEngine\platform\windows\godot_windows.cpp:206)
[55] main (D:\Data\Godot\Code\SpaceEngine\platform\windows\godot_windows.cpp:220)
[56] WinMain (D:\Data\Godot\Code\SpaceEngine\platform\windows\godot_windows.cpp:234)
[57] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[58] <couldn't map PC to fn name>
-- END OF BACKTRACE --
```

### Steps to reproduce

1. Open MRP
2. Open Scene res://levelInfoNode/levelInfoNode.tscn
3. Select unlockAnimPlayer Node and confirm it is opened in the AnimationEditor
4. Switch to scene a.tscn(its an empty scene)
5. Run project in any way and get the crash

### Minimal reproduction project (MRP)

[mrp.zip](https://github.com/user-attachments/files/18440239/mrp.zip)