godotengine / godotengine/godot

3D scenes crash when running, intermittently

Open
#97,847 6 comments 0 reactions 0 assignees View on GitHub
bug needs testing topic:animation
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in v4.3.stable.official.77dcf97d8 and v4.4.dev3.mono.official.f4af8201b

### System information

Godot v4.4.dev3.mono - Windows 10.0.19045 - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 32.0.15.6094) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 threads)

### Issue description

When running or loading into 3D Scenes, the game crashes sometimes.
if I run in a custom build with debug symbols I get this.
Seems like it's possibly an issue with an animation tree?
I have no idea how to diagnose or fix this issue.

```
================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.1.rc.custom_build
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0]
[1] _CxxThrowException (D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\throw.cpp:82)
[2] __RTDynamicCast (D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\rtti.cpp:291)
[3] Ref::Ref (C:\godot\godot-4.3\core\object\ref_counted.h:178)
[4] AnimationNodeBlendSpace2D::_process (C:\godot\godot-4.3\scene\animation\animation_blend_space_2d.cpp:575)
[5] AnimationNode::process (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:366)
[6] AnimationNode::_pre_process (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:131)
[7] AnimationNode::_blend_node (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:300)
[8] AnimationNode::blend_node (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:183)
[9] AnimationNodeStateMachinePlayback::_transition_to_next_recursive (C:\godot\godot-4.3\scene\animation\animation_node_state_machine.cpp:979)
[10] AnimationNodeStateMachinePlayback::_process (C:\godot\godot-4.3\scene\animation\animation_node_state_machine.cpp:807)
[11] AnimationNodeStateMachine::_process (C:\godot\godot-4.3\scene\animation\animation_node_state_machine.cpp:1622)
[12] AnimationNode::process (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:366)
[13] AnimationNode::_pre_process (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:131)
[14] AnimationTree::_blend_pre_process (C:\godot\godot-4.3\scene\animation\animation_tree.cpp:642)
[15] AnimationMixer::_process_animation (C:\godot\godot-4.3\scene\animation\animation_mixer.cpp:939)
[16] AnimationMixer::_notification (C:\godot\godot-4.3\scene\animation\animation_mixer.cpp:2217)
[17] AnimationMixer::_notificationv (C:\godot\godot-4.3\scene\animation\animation_mixer.h:43)
[18] AnimationTree::_notificationv (C:\godot\godot-4.3\scene\animation\animation_tree.h:230)
[19] Object::notification (C:\godot\godot-4.3\core\object\object.cpp:876)
[20] SceneTree::_process_group (C:\godot\godot-4.3\scene\main\scene_tree.cpp:961)
[21] SceneTree::_process (C:\godot\godot-4.3\scene\main\scene_tree.cpp:1034)
[22] SceneTree::process (C:\godot\godot-4.3\scene\main\scene_tree.cpp:528)
[23] Main::iteration (C:\godot\godot-4.3\main\main.cpp:4157)
[24] OS_Windows::run (C:\godot\godot-4.3\platform\windows\os_windows.cpp:1658)
[25] widechar_main (C:\godot\godot-4.3\platform\windows\godot_windows.cpp:181)
[26] _main (C:\godot\godot-4.3\platform\windows\godot_windows.cpp:208)
[27] main (C:\godot\godot-4.3\platform\windows\godot_windows.cpp:220)
[28] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[29]
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

Run any 3D scene with NPC CharacterBody3D's in my project

### Minimal reproduction project (MRP)

Link to my project here:
https://drive.google.com/file/d/1XEsY0DzpiZ0vT8pcSUoZQ8mpA1NuxzFH/view?usp=sharing

Contributor guide

Open the contributing guide

Research direction

Start with the minimal reproduction project and the crash path in scene/animation/animation_blend_space_2d.cpp around line 575. Read the related processing paths in animation_tree.cpp and animation_node_state_machine.cpp, then verify whether running or loading the reported 3D scene still crashes. Done means the scene runs without the intermittent crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.