Description

Enabling Collision on a Spline Mesh component with a Static Mesh assigned causes an assertion to fail while executing in a package. This does NOT occur if you play in editor.

Repro Rate: 4/4

Tested this in //UE4/Release-4.27 @ CL#18319896 and this issue did not occur there, it is a regression. (Tested utilizing SM_Chair Static Mesh, the crash still occurred in 5.0 with this mesh!)

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 691] 
Array index out of bounds: 0 from an array of size 0
Steps to Reproduce
  1. Create a new Third Person BP project
  2. Create a new Blueprint based on Actor
  3. Add a Spline Mesh component
  4. In Details, set the Mobility to Movable and the Static Mesh to SM_Cylinder
  5. In the Event Graph, hook up a delay node of two seconds to Event BeginPlay
  6. Drag a reference of the Spline Mesh component into the Event Graph
  7. From the reference, place the "Set Collision Enabled" node
  8. Change the New Type to "Query Only (No Physics Collision)"
  9. Hook up the "Delay" to the "Set Collision Enabled" node then Save & Compile
  10. Place the Blueprint Actor into the scene
  11. Package the Project for your Platform
  12. Run the Package and wait two seconds

Results: Project crashes, hitting an assertion failed error.
Expected: Project successfully enables the collision on the Spline Mesh component without the project crashing.

Callstack
=== Critical error: ===

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 691] 
Array index out of bounds: 0 from an array of size 0


[Callstack] 0x00007ff7afd28a58 UnrealGame.exe!Chaos::FTriangleMeshImplicitObject::FTriangleMeshImplicitObject<unsigned short>() []
[Callstack] 0x00007ff7afd2b298 UnrealGame.exe!TPairInitializer<UPrimitiveComponent * __ptr64 const & __ptr64,TArray<IPhysicsProxyBase * __ptr64,TSizedDefaultAllocator<32> > const & __ptr64>::operator<UPrimitiveComponent * __ptr64,TArray<IPhysicsProxyBase * __ptr64,TSizedDefaultAllocator<32> > > TTuple<UPrimitiveComponent * __ptr64,TArray<IPhysicsProxyBase * __ptr64,TSizedDefaultAllocator<32> > >() []
[Callstack] 0x00007ff7afd3dd01 UnrealGame.exe!Chaos::Cooking::BuildTriangleMeshes() []
[Callstack] 0x00007ff7afd41ee7 UnrealGame.exe!Chaos::FCookHelper::Cook() []
[Callstack] 0x00007ff7afd4572e UnrealGame.exe!UBodySetup::CreatePhysicsMeshes() []
[Callstack] 0x00007ff7ab0961f4 UnrealGame.exe!UObject::ConditionalPostLoad() []
[Callstack] 0x00007ff7ab1de9fd UnrealGame.exe!StaticDuplicateObjectEx() []
[Callstack] 0x00007ff7ab1dd839 UnrealGame.exe!StaticDuplicateObject() []
[Callstack] 0x00007ff7af68a746 UnrealGame.exe!USplineMeshComponent::RecreateCollision() []
[Callstack] 0x00007ff7af689399 UnrealGame.exe!USplineMeshComponent::OnCreatePhysicsState() []
[Callstack] 0x00007ff7af56ead0 UnrealGame.exe!UActorComponent::CreatePhysicsState() []
[Callstack] 0x00007ff7af5d8a1f UnrealGame.exe!UPrimitiveComponent::EnsurePhysicsStateCreated() []
[Callstack] 0x00007ff7afe5cbcd UnrealGame.exe!UPrimitiveComponent::SetCollisionEnabled() []
[Callstack] 0x00007ff7b069a3d4 UnrealGame.exe!UPrimitiveComponent::execSetCollisionEnabled() []
[Callstack] 0x00007ff7aaf6e579 UnrealGame.exe!UFunction::Invoke() []
[Callstack] 0x00007ff7ab14fb82 UnrealGame.exe!UObject::CallFunction() []
[Callstack] 0x00007ff7ab160c0f UnrealGame.exe!UObject::ProcessContextOpcode() []
[Callstack] 0x00007ff7ab163de1 UnrealGame.exe!ProcessLocalScriptFunction() []
[Callstack] 0x00007ff7ab162fe1 UnrealGame.exe!UObject::ProcessInternal() []
[Callstack] 0x00007ff7aaf6e579 UnrealGame.exe!UFunction::Invoke() []
[Callstack] 0x00007ff7ab1624f2 UnrealGame.exe!UObject::ProcessEvent() []
[Callstack] 0x00007ff7af238886 UnrealGame.exe!AActor::ProcessEvent() []
[Callstack] 0x00007ff7af9e41e6 UnrealGame.exe!FLatentActionManager::TickLatentActionForObject() []
[Callstack] 0x00007ff7af9d19ff UnrealGame.exe!FLatentActionManager::ProcessLatentActions() []
[Callstack] 0x00007ff7afa192d4 UnrealGame.exe!UWorld::Tick() []
[Callstack] 0x00007ff7af84667c UnrealGame.exe!UGameEngine::Tick() []
[Callstack] 0x00007ff7a93b9227 UnrealGame.exe!FEngineLoop::Tick() []
[Callstack] 0x00007ff7a93d0b7c UnrealGame.exe!GuardedMain() []
[Callstack] 0x00007ff7a93d0c4a UnrealGame.exe!GuardedMainWrapper() []
[Callstack] 0x00007ff7a93d3ccc UnrealGame.exe!LaunchWindowsStartup() []
[Callstack] 0x00007ff7a93e5474 UnrealGame.exe!WinMain() []
[Callstack] 0x00007ff7b144766a UnrealGame.exe!__scrt_common_main_seh() []
[Callstack] 0x00007ffc536d7bd4 KERNEL32.DLL!UnknownFunction []
[Callstack] 0x00007ffc5504ced1 ntdll.dll!UnknownFunction []

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-151106 in the post.

27
Login to Vote

Fixed
ComponentUE - Simulation - Physics
Affects Versions5.0
Target Fix5.1
Fix Commit22750167
Main Commit22788215
Release Commit22750167
CreatedMay 4, 2022
ResolvedOct 25, 2022
UpdatedNov 27, 2022
View Jira Issue