Description

Initialize_AnyThread and CacheBones_AnyThread can be called repeatedly on sub-graphs below Saved Pose nodes when they are part of a linked anim graph and the main anim graph has yet to be initialized. This can happen when bTickAnimationOnSkeletalMeshInit is disabled, and LinkAnimClassLayers is called on the first frame that a mesh is active. LinkAnimClassLayers results in a call to Initialize_AnyThread and CacheBones_AnyThread on nodes within the linked graph's anim graph. But the synchronization counters are invalid as we use the counters from the parent graph (which hasn't been initialized yet).

Steps to Reproduce
  1. Create a main anim bp
  2. Create a second anim bp
  3. Create an anim layer interface containing a single layer
  4. Add the interface to both anim bps
    1. Setup the layer in the main anim bp to just play a single animation
    2. Setup the layer in the second anim bp to have an animation fed into a Saved Pose node. Then use that pose via two Cached Pose nodes fed into a layered blend (with an alpha of 0.5). Then hook up the output of the layered blend to the output of the layer.
  5. Back in the main anim bp, in the main anim graph, hookup a linked layer node for your layer to the output of the anim graph
  6. Create a character blueprint and setup the mesh and the main anim bp you just created
    1. In the character's Begin Play event, call Link Anim Class Layers and link in the second anim bp
  7. Drop the character blueprint into the level
  8. In the project settings disable Tick Animation On Skeletal Mesh Init
  9. Place a breakpoint in FAnimNode_SaveCachedPose::Initialize_AnyThread and FAnimNode_SaveCachedPose::CacheBones_AnyThread
  10. run PIE
  11. Notice how both Initialize_AnyThread and CacheBones_AnyThread recursively call their children multiple times. This should only happen once per Saved Pose node but because InitializationCounter is invalid, the subgraph under the Saved Pose node is being recursed multiple times.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-296358 in the post.

0
Login to Vote

Unresolved
CreatedJun 13, 2025
UpdatedJun 16, 2025
View Jira Issue