Memory optimization done at CL 44140136 introduced this issue. Fix use-after-free by not using memstack allocator for persistent data. StateStack is being copied into the tick record which makes it persistent, but memstack allocations are per-frame and thus, not persistent. Doubled inline alloc size to account for this so we don’t see increased memory pressure from this change.
Look at `FActiveStateMachineScope::MakeUniqueEventContextData` and how it’s used to help determine root cause.
Small fix in .\Engine\Source\Runtime\Engine\Public\Animation\ActiveStateMachineScope.h
USTRUCT()
struct FEncounteredStateMachineStack
{
...
TArray<FStateMachineEntry, TInlineAllocator<8>> StateStack
...
[Attachment Removed]