AnimationPlayer is Throwing Strange Errors

Godot Version

4.5

Question

I am getting the following infinite stream of errors when I open my AnimationPlayer. The errors do not show up when I run the game:

ERROR: scene/resources/animation.cpp:1901 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: Animation ‘’ doesn’t exist.
ERROR: scene/resources/animation.cpp:1547 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: scene/resources/animation.cpp:1901 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: Animation ‘’ doesn’t exist.
ERROR: scene/resources/animation.cpp:1547 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: scene/resources/animation.cpp:1901 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: Animation ‘’ doesn’t exist.
ERROR: scene/resources/animation.cpp:1547 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: scene/resources/animation.cpp:1901 - Index p_track = -1 is out of bounds (tracks.size() = 4).
ERROR: Animation ‘’ doesn’t exist…

I originally had one AnimatedSprite2D that was animated by a AnimationPlayer and controlled by an AnimationTree but I wanted to switch to layered animations. So, I created three AnimatedSprite2D nodes and I layered them together in another AnimationPlayer. At this point the stream of errors started coming. Additionally, the layers started to run out of sync. The idle animations would run for one layer while the move animation ran for another layer. I am going crazy trying to figure it out. Any form of help is needed!

Can you elaborate on how you’re running the animations? Is it through code, signals, or automatic? You’re trying to call/run something that doesn’t exist. Track 4. That might be a node reference within an animation, or an animation itself that no longer exists. Screenshots of the animations would help a lot to figure out exactly what’s going on.

I figured it out. The issue was that I was keying the sprite frames instead of the animations from my AnimatedSprite2D. This is odd as the tutorial I watched was keying the sprite frames and not the animations to create an animation track in the AnimationPlayer. My guess is that there was some ambiguity with the resource IDs when I was stacking multiple keyed sprite frames in one animation leading to the error. Thank you for the reply though!