Skip to content

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

@meowyih

Description

@meowyih

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions