Destroying a welded actor is causing an Array index out of bounds crash on 5.6. The licensee has provided a repro project that reliably causes a crash whenever the spawned actor is destroyed. There is probably a mismatch between the number of shapes in the physics particle and the PushPhysicsState call.
I've reproduced the behavior on both 5.6 and 5.7 (CL44372627).
I've attached the crash call stack.
I suggest using the provided repro project as the setup is complex.
To use it, open the project, Play-In-Editor, and, after 4 seconds, observe the crash.
From scratch:
On a blank project, create a BP (name it SubObject) and add a Cube component to it.
Confirm the component is simulating physics.
Create a new BP (name it BaseObject).
Add a cube component to BaseObject as well.
Confirm it is simulating physics.
On BaseObject`s BeginPlay:
Call a few times SpawnActor SubObject and AttachActorToActor with WeldSimulatedBodies enabled - keep a reference to each spawned actor
Add a Delay and DestroyActor targeting one of the spawned SubObjects.
Expected result: this operation should be safe
Actual result: the Editor crashes and the call stack points towards a mismatch between the number of shapes in the physics particle and the PushPhysicsState call
> [Inline Frame] UnrealEditor-Chaos.dll!TArray<TUniquePtr<Chaos::FShapeInstanceProxy,TDefaultDelete<Chaos::FShapeInstanceProxy>>,TSizedInlineAllocator<1,32,TSizedDefaultAllocator<32>>>::RangeCheck(int) Line 1067 C++
[Inline Frame] UnrealEditor-Chaos.dll!TArray<TUniquePtr<Chaos::FShapeInstanceProxy,TDefaultDelete<Chaos::FShapeInstanceProxy>>,TSizedInlineAllocator<1,32,TSizedDefaultAllocator<32>>>::operator[](int) Line 1158 C++
UnrealEditor-Chaos.dll!Chaos::TGeometryParticle<double,3>::SyncRemoteData(Chaos::FDirtyPropertiesManager & Manager, int DataIdx, Chaos::FDirtyChaosProperties & RemoteData, const TArray<int,TSizedDefaultAllocator<32>> & ShapeDataIndices, Chaos::FShapeDirtyData * ShapesRemoteData) Line 3034 C++
UnrealEditor-Chaos.dll!Chaos::FPBDRigidsSolver::PushPhysicsState::__l2::<lambda_3>::operator()(int DataIdx, Chaos::FDirtyProxy & Dirty) Line 1457 C++
[Inline Frame] UnrealEditor-Chaos.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::FFunctionRefStoragePolicy,void __cdecl(int)>::operator()(int <Params_0>) Line 471 C++
[Inline Frame] UnrealEditor-Chaos.dll!ParallelForImpl::CallBody(const TFunctionRef<void __cdecl(int)> &) Line 81 C++
UnrealEditor-Chaos.dll!??$ParallelForInternal@V?$TFunctionRef@$$A6AXH@Z@@V<lambda_1>@?1??ParallelFor@@YAXPEB_WHHV1@W4EParallelForFlags@@@Z@$$T@ParallelForImpl@@YAXPEB_WHHV?$TFunctionRef@$$A6AXH@Z@@V<lambda_1>@?1??ParallelFor@@YAX0HH1W4EParallelForFlags@@@Z@2AEBV?$TArrayView@$$TH@@@Z(const wchar_t * DebugName, int Num, int MinBatchSize, TFunctionRef<void _cdecl(int)> Body, ParallelFor::_l2::<lambda_1> CurrentThreadWorkToDoBeforeHelping, EParallelForFlags Flags, const TArrayView<std::nullptr_t,int> & Contexts) Line 150 C++
[Inline Frame] UnrealEditor-Chaos.dll!ParallelFor(const wchar_t *) Line 545 C++
[Inline Frame] UnrealEditor-Chaos.dll!Chaos::FDirtySet::ParallelForEachProxy(const Chaos::FPBDRigidsSolver::PushPhysicsState::__l2::<lambda_3> &) Line 203 C++
UnrealEditor-Chaos.dll!Chaos::FPBDRigidsSolver::PushPhysicsState(const double DeltaTime, const int NumSteps, const int NumExternalSteps) Line 1441 C++
UnrealEditor-Chaos.dll!Chaos::FPhysicsSolverBase::AdvanceAndDispatch_External(double InDt) Line 495 C++
UnrealEditor-PhysicsCore.dll!FChaosScene::StartFrame() Line 379 C++
[Inline Frame] UnrealEditor-Engine.dll!UWorld::StartPhysicsSim() Line 223 C++
UnrealEditor-Engine.dll!FStartPhysicsTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> & MyCompletionGraphEvent) Line 244 C++
[Inline Frame] UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> &) Line 329 C++
UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() Line 706 C++
UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 527 C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 505 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilIdle(int QueueIndex) Line 679 C++
[Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilIdle(ENamedThreads::Type) Line 1419 C++
UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessUntilTasksComplete(const TArray<TRefCountPtr<FBaseGraphTask>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown, const TFunction<enum FTaskGraphInterface::EProcessTasksOperation __cdecl(int)> & IdleWorkUpdate) Line 1592 C++
UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete, TArray<FTickFunction *,TSizedDefaultAllocator<32>> & TicksToManualDispatch) Line 986 C++
UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 2079 C++
UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 786 C++
UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1520 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2151 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 533 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5625 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 60 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 187 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 271 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 339 C++
[External Code]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-308040 in the post.
0 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 5.6, 5.7 |
Created | Jul 30, 2025 |
---|---|
Updated | Sep 11, 2025 |