godotengine / godotengine/godot

ERROR: Animation '{some name}' doesn't exist. The bug caused by the data in *.tscn file does not sync with Godot editor.

Open
#112,442 11 comments 0 reactions 0 assignees View on GitHub
bug needs testing needs work topic:animation topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.5.1 stable version.

### System information

Window 11

### Issue description

When create an animation in SpriteFrame and assigned to AnimatiedSprited3D, Godot editor write a line in *.tscn to keep track of the activate animation with the name. But when user delelted the animation, Godot editor sometimes does not update the *.tscn file and keep the old non-existing animation name in it. It caused ERROR: Animation '{some name}' doesn't exist. when user run the project.
Since user cannot fix this problem inside editor, when it occurred, user needs to use text editor to change the tscn file manually or delete the whole *.tscn (i.e. the entire scene), which is pretty bad.

### Steps to reproduce

To reproduce it:
1. Create a new project.
2. Create a new scene using AnimatedSprite3D type. (Click +Other Node -> AnimatedSprite3D)
3. Create a new SpriteFrame resource with default name "new_sprite_frames.tres" in FileSystem and in the SpriteFrame editor window, create a new animation with default name "new_animation" under default animation.
4. In AnimatedSprite3D's inspector window, assign "new_sprite_frames.tres" to Sprite Frames property and "new_animation" to Animation property.
5. Run the project to save the current scene information in to "animated_sprite_3d.tscn"
6. Stop the running window and delete the "new_animation" in SpriteFrame editor window.
7. Save & Quit the project without running the project second time.
8. Before launch Godot again, you can check in "animated_sprite_3d.tscn" there is a [animation = &“new_animation”]. But we already deleted it in step 6.
9. Because of (8), the non-existing animation name will be there forever. Everytime user run the project will get the "ERROR: Animation 'new_animation' doesn't exist." error message.

### Minimal reproduction project (MRP)

[bug-nonexisting-animation.zip](https://github.com/user-attachments/files/23364944/bug-nonexisting-animation.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached minimal reproduction project and follow the AnimatedSprite3D and SpriteFrame editor steps through saving and deleting the animation. Inspect how the editor saves the animation property into the .tscn scene file. Done means deleting an animation removes or clears the stale serialized name, and running the project no longer reports the missing animation error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.