We’re hitting the ensure in FBoundsCacheElement::GetValue
in InstancedStaticMeshComponent.cpp when a single instance is added. This looks like the same issue that https://github.com/EpicGames/UnrealEngine/commit/5144e6d8e398183107036f3a883cf1dcbc4808b5 is intended to fix, except via AddInstance rather than AddInstances.
I assume that making the same change to AddInstanceInternal is appropriate?
Truncated callstack:
[UnrealEditor-Engine.dll] FBoundsCacheElement::GetValue::__l2::<lambda_1>::operator()() InstancedStaticMeshComponent.h:128
[UnrealEditor-Engine.dll] FBoundsCacheElement::GetValue(bool) InstancedStaticMeshComponent.h:128
[UnrealEditor-Engine.dll] UInstancedStaticMeshComponent::GetNavigationBounds() InstancedStaticMesh.cpp:5417
[UnrealEditor-Engine.dll] FNavigationElement::InitializeFromInterface(const INavRelevantInterface *) NavigationElement.cpp:89
[UnrealEditor-Engine.dll] FNavigationElement::FNavigationElement(const INavRelevantInterface &, unsigned long long) NavigationElement.cpp:66
[UnrealEditor-NavigationSystem.dll] UNavigationObjectRepository::RegisterNavRelevantObjectInternal(const INavRelevantInterface &, const UObject &, ENotifyOnSuccess) NavigationObjectRepository.cpp:137
[UnrealEditor-NavigationSystem.dll] UNavigationObjectRepository::RegisterNavRelevantObject(const INavRelevantInterface &) NavigationObjectRepository.cpp:98
[UnrealEditor-NavigationSystem.dll] UNavigationSystemV1::RegisterNavRelevantObjectStatic(const INavRelevantInterface &, const UObject &) NavigationSystem.cpp:3614
[UnrealEditor-NavigationSystem.dll] UNavigationSystemV1::RegisterComponentToNavOctree(UActorComponent *) NavigationSystem.cpp:3392
[UnrealEditor-NavigationSystem.dll] UNavigationSystemV1::RegisterComponent(UActorComponent *) NavigationSystem.cpp:4093
[UnrealEditor-NavigationSystem.dll] ``UNavigationSystemV1::UNavigationSystemV1'::`2'::FDelegatesInitializer::FDelegatesInitializer'::`2'::<lambda_13>::operator()(UActorComponent &) NavigationSystem.cpp:825
[UnrealEditor-Engine.dll] TDelegate::Execute(UActorComponent &) DelegateSignatureImpl.inl:614
[UnrealEditor-Engine.dll] FNavigationSystem::RegisterComponent(UActorComponent &) NavigationSystemBase.cpp:283
[UnrealEditor-Engine.dll] UInstancedStaticMeshComponent::AddInstanceInternal(int, FInstancedStaticMeshInstanceData *, const UE::Math::TTransform<…> &, bool) InstancedStaticMesh.cpp:3474
[UnrealEditor-Engine.dll] UInstancedStaticMeshComponent::AddInstance(const UE::Math::TTransform<…> &, bool) InstancedStaticMesh.cpp:3508
...