Class "UInstancedStaticMeshComponent" deliberately leaves null pointers in the "InstanceBodies" array of FBodyInstances. This can be seen in methods such as:
[Engine\Source\Runtime\Engine\Private\InstancedStaticMesh.cpp]
UInstancedStaticMeshComponent::CreateAllInstanceBodies()
UInstancedStaticMeshComponent::SetupNewInstanceData()
UInstancedStaticMeshComponent::UpdateInstanceBodyTransform()
However, method UInstancedStaticMeshComponent::RemoveInstanceInternal() does not take this into account, and the following code crashes the engine by attempting to access such null pointers:
// Re-target instance indices for shifting of array.
for (int32 i = InstanceIndex; i < InstanceBodies.Num(); ++i)
{
InstanceBodies[i]->InstanceBodyIndex = i;
}
Vitor Barata 2023-10-19 03:32:14 UTC
Hi [~W014KNNASUF], I've got a JIRA report related to case 00633572.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-198455 in the post.
2 |
Component | UE - Rendering Architecture |
---|---|
Affects Versions | 5.3 |
Target Fix | 5.4 |
Fix Commit | 29084185 |
---|---|
Main Commit | 29084194 |
Created | Oct 19, 2023 |
---|---|
Resolved | Oct 25, 2023 |
Updated | Nov 16, 2023 |