godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.57k stars 21.09k forks source link

Track of Current Animation Crash #98076

Open CEHR2005 opened 2 weeks ago

CEHR2005 commented 2 weeks ago

Tested versions

4.3.stable

System information

Godot v4.3.stable (77dcf97d8) - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 32.0.15.6109) - AMD Ryzen 7 6800H with Radeon Graphics (16 Threads)

Issue description

If you create a property track in animation player, which tracks current animation. It will сrash engine, and if you save it, it will сrash engine in every start or at least when you try to open this Animation Player.

https://github.com/user-attachments/assets/bee6354d-31d5-43bd-a6bc-acce66a60728

Steps to reproduce

Create Animation Player (AP) Create Animation in AP Add new Property Track on Current Animation of Ap. Add any key to Property Track Save file

Crash

If you try to open AP it will Crash

Minimal reproduction project (MRP)

test.zip

matheusmdx commented 2 weeks ago

I can confirm the crash in latest master v4.4.dev.custom_build [92e51fca7], seems the engine locks herself in an infinite recursion

image

image


Part of the backtrace that shows the loop:

AnimationPlayer::set_current_animation(const String & p_animation) Line 586 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:586)
call_with_variant_args_helper<AnimationPlayer,String const &,0>(AnimationPlayer * p_instance, void(AnimationPlayer::*)(const String &) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 304 (c:\Users\Matheus\Downloads\Godot Source\core\variant\binder_common.h:304)
call_with_variant_args_dv<AnimationPlayer,String const &>(AnimationPlayer * p_instance, void(AnimationPlayer::*)(const String &) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error, const Vector<Variant> & default_values) Line 452 (c:\Users\Matheus\Downloads\Godot Source\core\variant\binder_common.h:452)
MethodBindT<AnimationPlayer,String const &>::call(Object * p_object, const Variant * * p_args, int p_arg_count, Callable::CallError & r_error) Line 347 (c:\Users\Matheus\Downloads\Godot Source\core\object\method_bind.h:347)
ClassDB::set_property(Object * p_object, const StringName & p_property, const Variant & p_value, bool * r_valid) Line 1612 (c:\Users\Matheus\Downloads\Godot Source\core\object\class_db.cpp:1612)
Object::set(const StringName & p_name, const Variant & p_value, bool * r_valid) Line 254 (c:\Users\Matheus\Downloads\Godot Source\core\object\object.cpp:254)
Object::set_indexed(const Vector<StringName> & p_names, const Variant & p_value, bool * r_valid) Line 396 (c:\Users\Matheus\Downloads\Godot Source\core\object\object.cpp:396)
AnimationMixer::_blend_process(double p_delta, bool p_update_only) Line 1520 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:1520)
AnimationMixer::_process_animation(double p_delta, bool p_update_only) Line 942 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:942)
AnimationPlayer::seek_internal(double p_time, bool p_update, bool p_update_only, bool p_is_internal_seek) Line 674 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:674)
AnimationPlayer::_stop_internal(bool p_reset, bool p_keep_state) Line 788 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:788)
AnimationPlayer::stop(bool p_keep_state) Line 626 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:626)
AnimationPlayer::set_current_animation(const String & p_animation) Line 586 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:586)
call_with_variant_args_helper<AnimationPlayer,String const &,0>(AnimationPlayer * p_instance, void(AnimationPlayer::*)(const String &) p_method, const Variant * * p_args, Callable::CallError & r_error, IndexSequence<0> __formal) Line 304 (c:\Users\Matheus\Downloads\Godot Source\core\variant\binder_common.h:304)
call_with_variant_args_dv<AnimationPlayer,String const &>(AnimationPlayer * p_instance, void(AnimationPlayer::*)(const String &) p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error, const Vector<Variant> & default_values) Line 452 (c:\Users\Matheus\Downloads\Godot Source\core\variant\binder_common.h:452)
MethodBindT<AnimationPlayer,String const &>::call(Object * p_object, const Variant * * p_args, int p_arg_count, Callable::CallError & r_error) Line 347 (c:\Users\Matheus\Downloads\Godot Source\core\object\method_bind.h:347)
ClassDB::set_property(Object * p_object, const StringName & p_property, const Variant & p_value, bool * r_valid) Line 1612 (c:\Users\Matheus\Downloads\Godot Source\core\object\class_db.cpp:1612)
Object::set(const StringName & p_name, const Variant & p_value, bool * r_valid) Line 254 (c:\Users\Matheus\Downloads\Godot Source\core\object\object.cpp:254)
Object::set_indexed(const Vector<StringName> & p_names, const Variant & p_value, bool * r_valid) Line 396 (c:\Users\Matheus\Downloads\Godot Source\core\object\object.cpp:396)
AnimationMixer::_blend_process(double p_delta, bool p_update_only) Line 1520 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:1520)
AnimationMixer::_process_animation(double p_delta, bool p_update_only) Line 942 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:942)
AnimationPlayer::seek_internal(double p_time, bool p_update, bool p_update_only, bool p_is_internal_seek) Line 674 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:674)
AnimationPlayer::_stop_internal(bool p_reset, bool p_keep_state) Line 788 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:788)
AnimationPlayer::stop(bool p_keep_state) Line 626 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:626)
AnimationPlayer::set_current_animation(const String & p_animation) Line 586 (c:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_player.cpp:586)
RonYanDaik commented 5 days ago

I've added animation track in a scene. Then scene with animation player was added to another scene (Scene_2). Now it godot crashes when I open Scene_2.

godot.windows.editor.dev.x86_64.exe!Object::get_instance_id() Line 801 (..\Godot\core\object\object.h:801)
godot.windows.editor.dev.x86_64.exe!AnimationPlayer::_blend_pre_process(double p_delta, int p_track_count, const HashMap<NodePath,int,HashMapHasherDefault,HashMapComparatorDefault<NodePath>,DefaultTypedAllocator<HashMapElement<NodePath,int>>> & p_track_map) Line 302 (..\Godot\scene\animation\animation_player.cpp:302)
godot.windows.editor.dev.x86_64.exe!AnimationMixer::_process_animation(double p_delta, bool p_update_only) Line 944 (..\Godot\scene\animation\animation_mixer.cpp:944)
godot.windows.editor.dev.x86_64.exe!AnimationMixer::_notification(int p_what) Line 2217 (..\Godot\scene\animation\animation_mixer.cpp:2217)
godot.windows.editor.dev.x86_64.exe!AnimationMixer::_notificationv(int p_notification, bool p_reversed) Line 43 (..\Godot\scene\animation\animation_mixer.h:43)
godot.windows.editor.dev.x86_64.exe!AnimationPlayer::_notificationv(int p_notification, bool p_reversed) Line 39 (..\Godot\scene\animation\animation_player.h:39)
godot.windows.editor.dev.x86_64.exe!Object::notification(int p_notification, bool p_reversed) Line 870 (..\Godot\core\object\object.cpp:870)
godot.windows.editor.dev.x86_64.exe!SceneTree::_process_group(SceneTree::ProcessGroup * p_group, bool p_physics) Line 959 (..\Godot\scene\main\scene_tree.cpp:959)
godot.windows.editor.dev.x86_64.exe!SceneTree::_process(bool p_physics) Line 1039 (..\Godot\scene\main\scene_tree.cpp:1039)
godot.windows.editor.dev.x86_64.exe!SceneTree::process(double p_time) Line 528 (..\Godot\scene\main\scene_tree.cpp:528)
godot.windows.editor.dev.x86_64.exe!Main::iteration() Line 4129 (..\Godot\main\main.cpp:4129)
godot.windows.editor.dev.x86_64.exe!OS_Windows::run() Line 1666 (..\Godot\platform\windows\os_windows.cpp:1666)
godot.windows.editor.dev.x86_64.exe!widechar_main(int argc, wchar_t * * argv) Line 180 (..\Godot\platform\windows\godot_windows.cpp:180)
godot.windows.editor.dev.x86_64.exe!_main() Line 206 (..\Godot\platform\windows\godot_windows.cpp:206)
godot.windows.editor.dev.x86_64.exe!main(int argc, char * * argv) Line 220 (..\Godot\platform\windows\godot_windows.cpp:220)
godot.windows.editor.dev.x86_64.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 234 (..\Godot\platform\windows\godot_windows.cpp:234)
[Inline Frame] godot.windows.editor.dev.x86_64.exe!invoke_main() Line 102 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:102)
godot.windows.editor.dev.x86_64.exe!__scrt_common_main_seh() Line 288 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
kernel32.dll!00007ffb58037374() (Unknown Source:0)
ntdll.dll!00007ffb5929cc91() (Unknown Source:0)

image

It looks like it takes to blend from a current animation named "6". I don't have any animations named "6". And it is null pointer. image

My animation is named "swing". image