Hello,
This crash happens in skel mesh editor (desktop) as well as PS5 (runtime).
The random nature of the crash points towards some kind of memory corruption.
Bellow is the excerpt of code that crashes with AdvancedSkeleton node:
`//OptimusDataInterfaceAdvancedSkeleton.cpp
FSkeletalMeshObject* SkeletalMeshObject = SkeletalMesh->MeshObject;
const int32 LodIndex = SkeletalMeshObject->GetLOD(); // Inspecting inside SkeletalMeshObject when exception is triggered shows correct value for SkeletalMesh->MeshObject->DynamicData->LODIndex
FSkeletalMeshRenderData const& SkeletalMeshRenderData = SkeletalMeshObject->GetSkeletalMeshRenderData();
FSkeletalMeshLODRenderData const& LodRenderData = SkeletalMeshRenderData.LODRenderData[LodIndex]; // crash here as Lodindex is corrupted`Fiddling around I added:
FSkeletalMeshObject* SkeletalMeshObject = SkeletalMesh->MeshObject; const int32 LodIndex = SkeletalMeshObject->GetLOD(); FSkeletalMeshRenderData const& SkeletalMeshRenderData = SkeletalMeshObject->GetSkeletalMeshRenderData(); check(LodIndex == SkeletalMesh->MeshObject->GetLOD()); FResourceSizeEx CumulativeResourceSize; SkeletalMesh->MeshObject->GetResourceSizeEx(CumulativeResourceSize); // Now crashes inside this method with DynamicData = 0xFFFF (see screeshot) FSkeletalMeshLODRenderData const& LodRenderData = SkeletalMeshRenderData.LODRenderData[LodIndex];
Other minor fiddling with the code that don’t change functionality will also sometimes trigger SkeletalMesh->MeshObject->DynamicData to be null. I suspect the pointer to be freed in some other thread (explaining the random nature of the bug as well as the slight change in crash behavior).
Since in the mainline this seems to be fixed I was hoping maybe someone had an idea of what change I should integrate to avoid this in 5.5.