Crash when compiling Mutable Customizable Object

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.

Hello Avian,

Some crashes with morph merging have been addressed for 5.8. For example, the issue you found with OpenCode has already been resolved. To have a better understanding of the problem we would need a callstack or, if possible, a simple reproduction case.

Thanks for reporting,

Genis.