Encountered an issue "set_frame: Index p_frame = 17 is out of bounds" with higher version when trying to upgrade Godot from 4.1.1

Godot Version

4.1.1, 4.2.x, 4.3.x

Question

I’m developing a 2D side-scrolling game started with Godot_v4.1.1-stable_linux.x86_64 and recently encountered an issue: the project would freeze upon opening occasionally. When this happens, if I open it once successful with a higher version e.g., 4.3-beta3; 4.3-rc3, close player.tscn(not sure if it’s nessesary) and close Godot, then the project can be reopen with 4.1.1 successful.

I considered upgrading to v4.3, but I can’t edit some animation params with AnimationPlayer in the higher version, because the “Frame” and “Frame Coords” number on “Sprite2D → Inspector → Texture → Animation” are keep jumping erratically (seems between zero and some max frame numbers of character anmation) and cannot be set or reset manually to any value. The project can run correctly on higher version with the following error message output:

First error message

E 0:00:03:0708   set_frame: Index p_frame = 17 is out of bounds (vframes * hframes = 1).
  <C++ Source>      scene/2d/sprite_2d.cpp:254 @ set_frame()

following this with repeating multiple times:

E 0:00:03:0899   set_hframes: Amount of hframes cannot be smaller than 1.
  <C++ Error>       Condition "p_amount < 1" is true.
  <C++ Source>      scene/2d/sprite_2d.cpp:301 @ set_hframes()

All these error message has not appeared under 4.1.1.

Enviroments:

Ubuntu 24.04 LTS

AMD Ryzen 7 7700 8-Core Processor
mem 16G x2
nvdia 4060TI 16G
MSI 650m

Same issues appear with windows version. And if 4.1.1 can’t open project, 4.2.x will not open it correctly too.

How to quickly find the corrupted animation among 30+ animations in AnimationPlayer if the issues are caused by animations? Or the only way is check them one by one manually?

Any suggestions would be appreciated.

1 Like