SetBoneContainer crash the engine

Hi everyone,

I’m trying to sample an animation for several frames ahead in C++. But the SetBoneContainer() from FCompactPose class needed to call either AnimSequence->GetAnimationPose or using the experimental FSequenceBaseSampler make the engine crash with a 0x80000003 exception (so related to memory leaks apparently).

It specifically happens when it calls the InitBones() function ans set its own Bones TArray.

Does someone succeed to make it work ?

Best regards,

Alex

Ok so in FPoseContext there is comment stating that:

These Pose/Curve/Attributes are allocated using MemStack. You should not use it outside of stack.

So there is a magin line line used in several classes before creating FCompactPose which is FMemMark Mark(FMemStack::Get());

Well guess what. No crashes anymore.