I am running into a situation where USkeletalMeshComponent::SnapshotPose is crashing, because ComponentSpaceTransformsArray[CurrentReadComponentTransforms] is empty.
First off, I edited USkeletalMeshComponent::SnapshotPose to prevent the crash, and to just return an invalid snapshot, as it’s already set up to be able to do.
[Image Removed]
Here is the state of the relevant variables during this SnapshotPose, when it was crashing prior to the change I added to ensure there is >0 transforms.
[Image Removed]
But next I am trying to get to the bottom of why the transform array is coming up empty sometimes.
The situation is that the actor is bound to a sequencer, the actor has ragdoll triggered, and this occurs during my get up from ragdoll code, where a snapshot is taken to capture the settled physics enabled state of the mesh, before using it to blend into a get up animation.
I haven’t gotten this with a standalone character with physics enabled ragdoll, as far as I can tell, so I’m wondering if something could be not playing nice between the sequencer and the character mesh.
While I continue to debug it, I wanted to ask if anyone might have any ideas.
What I’ve observed so far.
- Printing out the state of the ComponentSpaceTransformsArray shows that there is often one of them empty, but the one indexed by CurrentReadComponentTransforms seems to always have transforms
- USkinnedMeshComponent::FlipEditableSpaceBases seems to be the sole place the render index is altered
- ParallelAnimationEvaluationTask is null(thinking it might be in the middle of an update)
I’m at a loss so far about how to track this bug down. Any help is appreciated.