Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash to desktop when setting an AnimationTree AnimationNodeBlendSpace2D's blend mode before creating points. #92528

Closed
adambiser opened this issue May 29, 2024 · 1 comment · Fixed by #92636

Comments

@adambiser
Copy link

Tested versions

  • Reproducible in v4.2.2.stable.official [15073af]

System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GT 730 (NVIDIA; 30.0.14.7414) - Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 Threads)

Issue description

Changing an AnimationTree's AnimationNodeBlendSpace2D blend mode before creating points will cause Godot to crash to desktop, losing unsaved changes.

Steps to reproduce

Open the MRP. The AnimationTree editor should be open.

  1. Change the blend mode.
  2. Godot crashes without error. Unsaved changes are lost.

From any scene in any project:

  1. Add an AnimationTree to the scene.
  2. Set its "Tree Root" to AnimationNodeBlendSpace2D.
  3. With the AnimationTree editor open, change the blend mode.
  4. Godot crashes without error. Unsaved changes are lost.

Minimal reproduction project (MRP)

AnimationTree_CrashTest.zip

@matheusmdx
Copy link
Contributor

matheusmdx commented May 31, 2024

Tested with 4.1,stable, 4.1.4.stable, 4.2.2.stable, 4.3.dev6 and latest master v4.3.beta.custom_build [a4f2ea9] and i found that is a regression introduced in 4.2.dev6 by #80813:
image

Something i noticied doing the test is that not always result in a crash, some cases will start an error spam until you change back blend mode to continuos (and the error spam stops), the error is: scene/animation/animation_tree.cpp:182 - Condition "p_node.is_null()" is true. Returning: NodeTimeInfo()
image

Also when the crash happens, the backtrace i get was:

================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.dev.custom_build (4f59a77c51c52d20d09a3cf5319f01db3c9138ec)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] <couldn't map PC to fn name>
[1] <couldn't map PC to fn name>
[2] _CxxThrowException (D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\throw.cpp:82)
[3] __RTDynamicCast (D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\rtti.cpp:291)
[4] Object::cast_to<AnimationNode> (C:\Users\Matheus\Downloads\Godot Source\core\object\object.h:793)
[5] Ref<AnimationNode>::Ref<AnimationNode><AnimationRootNode> (C:\Users\Matheus\Downloads\Godot Source\core\object\ref_counted.h:177)
[6] AnimationNodeBlendSpace2D::_process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_blend_space_2d.cpp:568)
[7] AnimationNode::process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:331)
[8] AnimationNode::_pre_process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:106)
[9] AnimationTree::_blend_pre_process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:575)
[10] AnimationMixer::_process_animation (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:929)
[11] AnimationMixer::_notification (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:2139)
[12] AnimationMixer::_notificationv (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.h:43)
[13] AnimationTree::_notificationv (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.h:184)
[14] Object::notification (C:\Users\Matheus\Downloads\Godot Source\core\object\object.cpp:840)
[15] SceneTree::_process_group (C:\Users\Matheus\Downloads\Godot Source\scene\main\scene_tree.cpp:950)
[16] SceneTree::_process (C:\Users\Matheus\Downloads\Godot Source\scene\main\scene_tree.cpp:1031)
[17] SceneTree::process (C:\Users\Matheus\Downloads\Godot Source\scene\main\scene_tree.cpp:510)
[18] Main::iteration (C:\Users\Matheus\Downloads\Godot Source\main\main.cpp:3972)
[19] OS_Windows::run (C:\Users\Matheus\Downloads\Godot Source\platform\windows\os_windows.cpp:1476)
[20] widechar_main (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:182)
[21] _main (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:204)
[22] main (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:218)
[23] WinMain (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:232)
[24] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[25] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================

Or:

================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.dev.custom_build (4f59a77c51c52d20d09a3cf5319f01db3c9138ec)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] CowData<StringName>::_get_size (C:\Users\Matheus\Downloads\Godot Source\core\templates\cowdata.h:128)
[1] CowData<StringName>::size (C:\Users\Matheus\Downloads\Godot Source\core\templates\cowdata.h:181)
[2] CowData<StringName>::resize<0> (C:\Users\Matheus\Downloads\Godot Source\core\templates\cowdata.h:316)
[3] Vector<StringName>::resize (C:\Users\Matheus\Downloads\Godot Source\core\templates\vector.h:95)
[4] Vector<StringName>::clear (C:\Users\Matheus\Downloads\Godot Source\core\templates\vector.h:88)
[5] AnimationNode::blend_node (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:157)
[6] AnimationNodeBlendSpace2D::_process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_blend_space_2d.cpp:568)
[7] AnimationNode::process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:331)
[8] AnimationNode::_pre_process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:106)
[9] AnimationTree::_blend_pre_process (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.cpp:575)
[10] AnimationMixer::_process_animation (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:929)
[11] AnimationMixer::_notification (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.cpp:2139)
[12] AnimationMixer::_notificationv (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_mixer.h:43)
[13] AnimationTree::_notificationv (C:\Users\Matheus\Downloads\Godot Source\scene\animation\animation_tree.h:184)
[14] Object::notification (C:\Users\Matheus\Downloads\Godot Source\core\object\object.cpp:840)
[15] SceneTree::_process_group (C:\Users\Matheus\Downloads\Godot Source\scene\main\scene_tree.cpp:950)
[16] SceneTree::_process (C:\Users\Matheus\Downloads\Godot Source\scene\main\scene_tree.cpp:1031)
[17] SceneTree::process (C:\Users\Matheus\Downloads\Godot Source\scene\main\scene_tree.cpp:510)
[18] Main::iteration (C:\Users\Matheus\Downloads\Godot Source\main\main.cpp:3972)
[19] OS_Windows::run (C:\Users\Matheus\Downloads\Godot Source\platform\windows\os_windows.cpp:1476)
[20] widechar_main (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:182)
[21] _main (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:204)
[22] main (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:218)
[23] WinMain (C:\Users\Matheus\Downloads\Godot Source\platform\windows\godot_windows.cpp:232)
[24] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[25] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Development

Successfully merging a pull request may close this issue.

4 participants