Create Animation Asset crashes Editor when Skeleton has Virtual Bones

Hi EightyGee,

Thanks for reporting this, I’ve entered UE-46870. You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

-Matt W.

Repro Steps:

  1. Add a virtual bone to the skeleton
  2. Open an animation
  3. Select Create Asset > Create Animation > Reference Pose or Create Asset > Create Animation > Current Pose
  4. Set the save location & name
  5. Editor will crash with assert message when you hit “OK”

Since BoneSpaceTransforms includes the virtual bones and RefSkeleton.GetRawBoneNum() doesn’t the values aren’t going to match if there are virtual bones.

Assuming that the indices of virtual bones are always higher than the indices of the raw bones in the ref skeleton, changing the assert to read “>=” instead of “==” should safely fix the issue as the for loop that follows will still only loop through the bones in the raw skeleton, so as long as the first NumBones in the BoneSpaceTransforms map to bones in the raw skeleton, any additional bone transforms added as a result of the additional virtual bones will be ignored.