Why i keep getting error out of bound? ( animationplayer )

Godot Version

4.3

Question

why i keep getting error out of bound? ( animationplayer )

so i have 2 type animation idle and move
and i use animationtree
but if i only use walk animation without using any idle animation, i wont get any error.
Example ,
if i remove this code in my walk state i wont get error

func _Enter_state():
	anim_tree.get("parameters/playback").travel("walk"))

**i keep getting this error, if i set frame more than 5, if put 6 or 7 i will get error **
this idle animation


this walk animation

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

tree

this my walk state

func _Enter_state():
	anim_tree.get("parameters/playback").travel("walk")
	

func _Physics_state_Update( _delta : float ):
	anim_tree.set("parameters/walk/BlendSpace2D/blend_position", input_ND.facing_dir)
	Entity_node.velocity = Entity_node.velocity.move_toward(input_ND.move_dir * Entity_node.move_speed , Entity_node.acceleration)
	if input_ND.move_dir == Vector2.ZERO:
		Change_State_Signal.emit( act_state_id, EnMgr.act_state.idle)

this idle state

func _Enter_state():
	anim_tree.set("parameters/idle/blend_position", input_ND.facing_dir)
	anim_tree.get("parameters/playback").travel("idle")
	

func _Physics_state_Update( _delta : float ):
	Entity_node.velocity = Entity_node.velocity.move_toward( Vector2.ZERO , Entity_node.friction)
	if input_ND.move_dir != Vector2.ZERO:
		Change_State_Signal.emit( act_state_id , EnMgr.act_state.walk )

already delete animation player and animation tree, then do all again and still get the same error.

this my duplicate project file with same error, when you move the player to up left or up right then stop , you will get error,
if you didt get error, try repeatly pust button ( S and Q ) or ( S and E )

https://github.com/kentapi99/20.12.2024.git

How many frames your animation have? Are you starting from the frame zero?
This looks like you’re ignoring the frame 0 and trying to go from 1 to 6 when should be 0 to 5.

Is your animation long enough for all the frames you want? From the screenshot it looks like it’s only 0.5s long, the out of bounds message might be referring to a keyframe being added at a point in time outside the bounds of the animation.

the highest frame i put is 6, and i have have 8 frame, like in screenshoot. if put above 5 i get error. i upload duplicate project file , if you want to check.

i change all my animation durition from 0.5 to +1, still get the same error,
i upload duplicate file, pls check if you can.

i try so many thing, so here some that may cause the problem

  1. when you put key frame in animation player , you should put less that Hframe, because its start from zero( this not the cause of my prolem)
  2. you must follow the oder and frame make sure at bottom last ( also not my problem)
    keyframe1
  3. this RESET i dont event know what this used for, and so anoying, this the one cause me a problem, u must make some kind of order animation in this node like no.2, else you get error . just follow order like this( yes this one cause me 3 day to figure out )
    keyframe3