Segfault on playing an `AnimationPlayer` capture track with invalid target
Author: isckeCreated Sep 18, 2026Updated Sep 28, 2026
Labelsbugconfirmedcrashtopic:animation
Tested versions
Reproducible on windows v4.8.dev.gh.9c776068d as well as windows 4.7.1 release
System information
Godot v4.8.dev (9c776068d) - Windows 10 (build 19045) - Direct3D 12 (Forward+)
Issue description
If an animation on an AnimationPlayer has a capture track with a track path that points to a node that doesn't exist, running the animation will segfault.
backtrace (no symbols, sorry, computer isn't really powerful enough to build the engine)
$ ../../Desktop/godot-nightly/godot.windows.editor.x86_64.exe . --scene node_2d.tscn
Godot Engine v4.8.dev.gh.9c776068d (2026-09-17 17:55:51 UTC) - https://godotengine.org
D3D12 12_0 - Forward+ - Using Device #0: NVIDIA - NVIDIA GeForce GTX 1050 Ti
WARNING: AnimationMixer (at: node_2d.tscn): 'new_animation', couldn't resolve track: 'A:position'. This warning can be disabled in Project Settings.
at: AnimationMixer::_update_caches (scene\animation\animation_mixer.cpp:736)
GDScript backtrace (most recent call first):
[0] _ready (res://node_2d.tscn::GDScript_wtcfe:3)
================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.8.dev.gh (9c776068d6ed23acd0c78bfe534272d1d2a3a619)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
Load address: 7ff6e1280000
[0] 7ff6e5105c19 (main+3e85c19) - <couldn't map PC to fn name>
[1] 7ff6e5105c19 (main+3e85c19) - <couldn't map PC to fn name>
[2] 7ff6e5121e81 (main+3ea1e81) - <couldn't map PC to fn name>
[3] 7ff6e512f63b (main+3eaf63b) - <couldn't map PC to fn name>
[4] 7ff6e51186d5 (main+3e986d5) - <couldn't map PC to fn name>
[5] 7ff6e51296ac (main+3ea96ac) - <couldn't map PC to fn name>
[6] 7ff6e7158171 (main+5ed8171) - <couldn't map PC to fn name>
[7] 7ff6e773a13a (main+64ba13a) - <couldn't map PC to fn name>
[8] 7ff6e26380f6 (main+13b80f6) - <couldn't map PC to fn name>
[9] 7ff6e248f400 (main+120f400) - <couldn't map PC to fn name>
[10] 7ff6e4cd9a44 (main+3a59a44) - <couldn't map PC to fn name>
[11] 7ff6e1a706d6 (main+7f06d6) - <couldn't map PC to fn name>
[12] 7ff6e7151595 (main+5ed1595) - <couldn't map PC to fn name>
[13] 7ff6e4cdbd7a (main+3a5bd7a) - <couldn't map PC to fn name>
[14] 7ff6e4cdbd3f (main+3a5bd3f) - <couldn't map PC to fn name>
[15] 7ff6e4cdcfa9 (main+3a5cfa9) - <couldn't map PC to fn name>
[16] 7ff6e133a42e (main+ba42e) - <couldn't map PC to fn name>
[17] 7ff6e139867d (main+11867d) - <couldn't map PC to fn name>
[18] 7ff6e1398497 (main+118497) - <couldn't map PC to fn name>
[19] 7ff6e13986f9 (main+1186f9) - <couldn't map PC to fn name>
[20] 7ff6e7c7587f (main+69f587f) - <couldn't map PC to fn name>
[21] 7ffdfabb7374 (kernel32.dll+17374) - <couldn't map PC to fn name>
-- END OF C++ BACKTRACE --
================================================================
GDScript backtrace (most recent call first):
[0] _ready (res://node_2d.tscn::GDScript_wtcfe:3)
-- END OF GDSCRIPT BACKTRACE --
================================================================
Segmentation faultSteps to reproduce
- Create an
AnimationPlayernode - Add a property track to manipulate some property, add a key to it that's not at 0 seconds
- Change the track type to capture mode
- Edit the track path, or change the node path, to make it point to an invalid node
- Play the animation, either through code or in the editor
Minimal reproduction project (MRP)
node_2d.tscn
[gd_scene format=3 uid="uid://duep0lu5qwy06"]
[sub_resource type="GDScript" id="GDScript_wtcfe"]
script/source = "extends Node2D
func _ready() -> void:
$AnimationPlayer.play(\"new_animation\")
"
[sub_resource type="Animation" id="Animation_0e48y"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_epypp"]
resource_name = "new_animation"
capture_included = true
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("A:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.46666667),
"transitions": PackedFloat32Array(1),
"update": 2,
"values": [Vector2(0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_0hol4"]
_data = {
&"RESET": SubResource("Animation_0e48y"),
&"new_animation": SubResource("Animation_epypp")
}
[node name="Node2D" type="Node2D" unique_id=1989762588]
script = SubResource("GDScript_wtcfe")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1688615076]
libraries/ = SubResource("AnimationLibrary_0hol4")Source: godotengine/godot