PhysicalAnimationComponent Mismatch between reference skeleton and localtransforms

Hello,

We are experiencing a crash in the PhysicalAnimationComponent where the ComputeLocalSpaceTargetTM function, the LocalTransforms[BoneIndex] is out of bounds, indicating a mismatch between the ReferenceSkeleton of the SkeletalMesh class and the LocalTransforms cache of the bones in the PhysicalAnimationComponent.

I believe this is the same issue as with this post: [Content removed] as our call stacks are identical too.

And as with the above post, we are also spawning actors dynamically and assigning a mesh to them dynamically as well.

We are also dynamically swapping between physical animation profiles depending on the situation using the ApplyPhysicalAnimationProfileBelow function. For example during idle state of the character or during getting hit and we are also . I have tried setting the bClearNotFound = true but it had no effect, making sure the mesh is updated correctly too.

The hardest part if that there is not clear reproduction steps but it happens often.

Would you have any suggestions on how to tackle this issue?

Also, as a suggestion for improvement, shouldn’t we be validating the index before accessing the LocalTransforms array in the ComputeLocalSpaceTargetTM eitherway?

Thanks in advance!

Regards,

Paris

It looks like some of our PhysicsAssets, the auto-generated ones, where badly setup so perhaps this is a false alarm, I will monitor and update in the next days.

However, I would still recommend that we check for a valid index before accessing that array.

Thanks,

Paris

Please ignore the above, looks like the error is still there. Will be making a local engine mod to check the index is valid before accessing it. Would be great to understand the root cause though! Thanks

Hi Paris, and thank you for reaching out.

Can I check if this is a the relevant skeleton is a local simulation? I’ve found a similar bug earlier in the year which was to do with replication and animations - but this was multiplayer.

Best

Geoff Stacey

Developer Relations

Epic Games