When using OpenCode to analyze the crash, this is what I’m getting back;
Root Cause
There is a bug in the header-copy phase of MergeMorphs at OpMeshMerge.h:130:
// Line 128 — copies MeshB.Morph.BatchesPerMorph[MeshBMorphIndex] batches
FMemory::Memcpy(..., MeshB.Morph.BatchesPerMorph[MeshBMorphIndex] * NumBatchHeaderDwords * sizeof(uint32));
// Line 130 — BUT advances the offset using Result's count (already incremented on line 115!)
BatchAccumulatedOffsetInDwords += MeshB.Morph.BatchesPerMorph[MorphIndex] * NumBatchHeaderDwords;
// ^^^^^^^^^^^ WRONG — should be MeshBMorphIndex
Line 115 first adds MeshB’s batch count into Result.Morph.BatchesPerMorph[MorphIndex]:
Result.Morph.BatchesPerMorph[MorphIndex] += MeshB.Morph.BatchesPerMorph[MeshBMorphIndex];
I made local changes to the OpMeshMerge.h in the Engine, but the crash persisted.