This never happens on ue5.0.0
The problem appears to be caused by a deleted PhysicsProxy being registered with Solver. Since the solver accesses the deleted PhysicsProxy, it may crash.
Checking and rejecting deleted proxies when adding them to MarshallingManager works as a work-around.
class FDirtySet { public: void Add(IPhysicsProxyBase* Base) { if(Base->GetDirtyIdx() == INDEX_NONE && Base->GetSyncTimestamp()->bDeleted == false ) // workaround // if(Base->GetDirtyIdx() == INDEX_NONE ) //original code { FDirtyProxiesBucket& Bucket = DirtyProxyBuckets[(uint32)Base->GetType()]; ++DirtyProxyBucketInfo.Num[(uint32)Base->GetType()]; ++DirtyProxyBucketInfo.TotalNum; const int32 Idx = Bucket.ProxiesData.Num(); Base->SetDirtyIdx(Idx); Bucket.ProxiesData.Add(Base); } }
Ensure was generated in logs:
Ensure condition failed: 0 && L"Unknown proxy type in physics solver." [File:D:\dev\UnrealEngine-5.0.2\Engine\Source\Runtime\Experimental\Chaos\Private\PBDRigidsSolver.cpp] [Line: 991]
Ensure condition failed: 0 && L"Unknown proxy type in physics solver." [File:D:\dev\UnrealEngine-5.0.2\Engine\Source\Runtime\Experimental\Chaos\Private\PBDRigidsSolver.cpp] [Line: 1128]
Chaos::FPBDRigidsSolver::PushPhysicsState::__l2::<lambda>(int DataIdx, Chaos::FDirtyProxy & Dirty) Line 991 C++ Chaos::FDirtySet::ParallelForEachProxy::__l2::<lambda>(int Idx) Line 148 C++ UE::Core::Private::Function::TFunctionRefCaller<void <lambda>(int),void __cdecl(int)>::Call(void * Obj, int & <Params_0>) Line 549 C++ `ParallelForImpl::NewParallelForInternal<TFunctionRef<void __cdecl(int)>,<lambda_600b85aa2a81f4761389a82b02631227>,std::nullptr_t>'::`2'::FParallelExecutor::operator()(const bool bIsMaster) Line 569 C++ ParallelForImpl::NewParallelForInternal<TFunctionRef<void __cdecl(int)>,<lambda_600b85aa2a81f4761389a82b02631227>,std::nullptr_t>(int Num, TFunctionRef<void __cdecl(int)> Body, ParallelFor::__l2::<lambda_600b85aa2a81f4761389a82b02631227> CurrentThreadWorkToDoBeforeHelping, EParallelForFlags Flags, const TArrayView<std::nullptr_t,int> & Contexts) Line 622 C++ ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,<lambda_600b85aa2a81f4761389a82b02631227>,std::nullptr_t>(int Num, TFunctionRef<void __cdecl(int)> Body, ParallelFor::__l2::<lambda_600b85aa2a81f4761389a82b02631227> CurrentThreadWorkToDoBeforeHelping, EParallelForFlags Flags, const TArrayView<std::nullptr_t,int> & Contexts) Line 652 C++ ParallelFor(int Num, TFunctionRef<void __cdecl(int)> Body, EParallelForFlags Flags) Line 698 C++ Chaos::FDirtySet::ParallelForEachProxy<void <lambda>(int, Chaos::FDirtyProxy &)>(const Chaos::FPBDRigidsSolver::PushPhysicsState::__l2::void <lambda>(int, Chaos::FDirtyProxy &) & Func) Line 149 C++ Chaos::FPBDRigidsSolver::PushPhysicsState(const double DeltaTime, const int NumSteps, const int NumExternalSteps) Line 995 C++ Chaos::FPhysicsSolverBase::AdvanceAndDispatch_External(double InDt) Line 373 C++ FChaosScene::StartFrame() Line 390 C++ UWorld::StartPhysicsSim() Line 159 C++ FStartPhysicsTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 183 C++ FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 287 C++ TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 977 C++ FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 753 C++ FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 642 C++ FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 2115 C++ FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FGraphEvent>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 2169 C++ FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 565 C++ FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1592 C++ UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 790 C++ UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1540 C++ UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1777 C++ UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 474 C++ FEngineLoop::Tick() Line 5215 C++ EngineTick() Line 63 C++ GuardedMain(const wchar_t * CmdLine) Line 186 C++ LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 272 C++ WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 330 C++
Chaos::FPBDRigidsSolver::ProcessSinglePushedData_Internal::__l2::<lambda>(int DataIdx, Chaos::FDirtyProxy & Dirty) Line 1128 C++ Chaos::FDirtySet::ForEachProxy<void <lambda>(int, Chaos::FDirtyProxy &)>(const Chaos::FPBDRigidsSolver::ProcessSinglePushedData_Internal::__l2::void <lambda>(int, Chaos::FDirtyProxy &) & Func) Line 171 C++ Chaos::FPBDRigidsSolver::ProcessSinglePushedData_Internal(Chaos::FPushPhysicsData & PushData) Line 1136 C++ Chaos::FPBDRigidsSolver::ProcessPushedData_Internal(Chaos::FPushPhysicsData & PushData) Line 1236 C++ Chaos::FPhysicsSolverAdvanceTask::AdvanceSolver() Line 118 C++ Chaos::FPhysicsSolverAdvanceTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 98 C++ TGraphTask<Chaos::FPhysicsSolverAdvanceTask>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 977 C++ FTaskGraphCompatibilityImplementation::QueueTask::__l5::<lambda>() Line 2027 C++ LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::TTaskDelegateImpl<<lambda_b0effac95abe128e68ff2c315eb1e3d1>,0>::CallAndMove(LowLevelTasks::TTaskDelegate<void __cdecl(bool),48> & Destination, void * InlineData, unsigned int DestInlineSize, bool <Params_0>) Line 171 C++ LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::CallAndMove<48>(LowLevelTasks::TTaskDelegate<void __cdecl(bool),48> & Destination, bool <Params_0>) Line 309 C++ LowLevelTasks::FTask::ExecuteTask() Line 423 C++ LowLevelTasks::FScheduler::TryExecuteTaskFrom<&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueGlobal,0>(LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue * Queue, LowLevelTasks::TLocalQueueRegistry<1024>::FOutOfWork & OutOfWork, bool bPermitBackgroundWork, bool bDisableThrottleStealing) Line 280 C++ LowLevelTasks::FScheduler::WorkerMain(LowLevelTasks::FSleepEvent * WorkerEvent, LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue * ExternalWorkerLocalQueue, unsigned int WaitCycles, bool bPermitBackgroundWork) Line 320 C++ LowLevelTasks::FScheduler::CreateWorker::__l2::<lambda>() Line 87 C++ UE::Core::Private::Function::TFunctionRefCaller<void <lambda>(void),void __cdecl(void)>::Call(void * Obj) Line 549 C++ UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(void)>::operator()() Line 677 C++ FThreadImpl::Run() Line 68 C++ FRunnableThreadWin::Run() Line 143 C++ FRunnableThreadWin::GuardedRun() Line 68 C++ FRunnableThreadWin::_ThreadProc(void * pThis) Line 39 C++
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-159101 in the post.
0 |
Component | UE - Simulation - Physics - Solver |
---|---|
Affects Versions | 5.0.2 |
Target Fix | 5.1 |
Created | Jul 11, 2022 |
---|---|
Resolved | Jul 22, 2022 |
Updated | Aug 10, 2022 |