Hi,
We are having crashes that happens during specific circumstances when unwelding actors and disabling collision. It’s not consistent, but seems to happen more often after recent GCs, I would assume that it’s due to larger timesteps, as when inspecting the objects it GC:d, it doesn’t collect any relevant objects that I can find.
It seems related to UE-308040 as it prohibits the same callstack. If you need more information, I can easily reproduce it in our project with the debugger attached.
When trying to get hold of the CL 45957177 mentioned in UE-308040, I get the error <description: restricted, no permission to view>. Would it be possible to get that CL as a patch? Or permission to the CL?
When investigating the crash, I stumbled over p.EnsureUnweldModifiesGTOnly and wonder, is the cvar still valid? Cause I can’t start a map/shut it down due to tons of the ensure Tried to unweld on body already in solver %s. We get also get it quite often during gameplay, as it trigger when we just rotating meshes. This is due to that bAutoWeld is true by default, and just setting the rotation to a mesh component will unweld and then weld it again. Is this something we should be catious of? And if so, what would the proper way of rotating a welded body from gameplay be? Or should it not be welded in that case?
We are releasing in 2 weeks time, so waiting for the solution in 5.7 isn’t possible
Cheers,
Markus
PS: Sorry if double posting, I thought I posted yesterday, but I couldn’t find any traces of my post today
This was created in relation to:
[Content removed]
Reproduction case in our game:
- Throw 3 darts at dartboard
- Stand on dartboard
- Pickup dartboard
- Start flying by physics gallore
- When landing start pickup dart a dart from dartboard and throw them at dartboard again
- Repeat step 5 a minute or so
- If not happen after a minute, restart map and retry
Callstack:
LogOutputDevice: Warning:
Script Stack (0 frames) :
LogWindows: Error: appError called: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:E:\P4\RideUGS\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 1067]
Array index out of bounds: 6 into an array of size 6
LogWindows: Windows GetLastError: The operation completed successfully. (0)
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:E:\P4\RideUGS\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 1067]
LogWindows: Error: Array index out of bounds: 6 into an array of size 6
LogWindows: Error:
LogWindows: Error:
LogWindows: Error: [Callstack] 0x00007ffbbbfb3448 UnrealEditor-Core.dll!FDebug::CheckVerifyFailedImpl2() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:728]
LogWindows: Error: [Callstack] 0x00007ffbae43c45c UnrealEditor-Chaos.dll!Chaos::TGeometryParticle<double,3>::SyncRemoteData() [E:\P4\RideUGS\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ParticleHandle.h:3034]
LogWindows: Error: [Callstack] 0x00007ffbae9a1a41 UnrealEditor-Chaos.dll!`Chaos::FPBDRigidsSolver::PushPhysicsState'::`2'::<lambda_3>::operator()() [E:\P4\RideUGS\Engine\Source\Runtime\Experimental\Chaos\Private\PBDRigidsSolver.cpp:1457]
LogWindows: Error: [Callstack] 0x00007ffbae2aa5b4 UnrealEditor-Chaos.dll!`ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,`ParallelFor'::`2'::<lambda_1>,std::nullptr_t>'::`2'::FParallelExecutor::operator()() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Public\Async\ParallelFor.h:117]
LogWindows: Error: [Callstack] 0x00007ffbae27f168 UnrealEditor-Chaos.dll!ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,`ParallelFor'::`2'::<lambda_1>,std::nullptr_t>() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Public\Async\ParallelFor.h:440]
LogWindows: Error: [Callstack] 0x00007ffbae9b318d UnrealEditor-Chaos.dll!Chaos::FPBDRigidsSolver::PushPhysicsState() [E:\P4\RideUGS\Engine\Source\Runtime\Experimental\Chaos\Private\PBDRigidsSolver.cpp:1441]
LogWindows: Error: [Callstack] 0x00007ffbae2b07f0 UnrealEditor-Chaos.dll!Chaos::FPhysicsSolverBase::AdvanceAndDispatch_External() [E:\P4\RideUGS\Engine\Source\Runtime\Experimental\Chaos\Private\Chaos\Framework\PhysicsSolverBase.cpp:495]
LogWindows: Error: [Callstack] 0x00007ffbaefda515 UnrealEditor-PhysicsCore.dll!FChaosScene::StartFrame() [E:\P4\RideUGS\Engine\Source\Runtime\PhysicsCore\Private\ChaosScene.cpp:379]
LogWindows: Error: [Callstack] 0x00007ffbb7fbf291 UnrealEditor-Engine.dll!FStartPhysicsTickFunction::ExecuteTick() [E:\P4\RideUGS\Engine\Source\Runtime\Engine\Private\PhysicsEngine\PhysLevel.cpp:244]
LogWindows: Error: [Callstack] 0x00007ffbb8865245 UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:706]
LogWindows: Error: [Callstack] 0x00007ffbbbc9ea82 UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:527]
LogWindows: Error: [Callstack] 0x00007ffbbbc91b1f UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:779]
LogWindows: Error: [Callstack] 0x00007ffbbbc92039 UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilIdle() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:679]
LogWindows: Error: [Callstack] 0x00007ffbbbc92766 UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessUntilTasksComplete() [E:\P4\RideUGS\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1592]
LogWindows: Error: [Callstack] 0x00007ffbb8887e74 UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup() [E:\P4\RideUGS\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:986]
LogWindows: Error: [Callstack] 0x00007ffbb8890ff6 UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup() [E:\P4\RideUGS\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:2079]
LogWindows: Error: [Callstack] 0x00007ffbb78adeaf UnrealEditor-Engine.dll!UWorld::RunTickGroup() [E:\P4\RideUGS\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:786]
LogWindows: Error: [Callstack] 0x00007ffbb78b9dfe UnrealEditor-Engine.dll!UWorld::Tick() [E:\P4\RideUGS\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1520]
LogWindows: Error: [Callstack] 0x00007ffbb2b8e814 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [E:\P4\RideUGS\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:2151]
LogWindows: Error: [Callstack] 0x00007ffbb3860ff6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [E:\P4\RideUGS\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:533]
LogWindows: Error: [Callstack] 0x00007ff6c5aa9ce4 UnrealEditor.exe!FEngineLoop::Tick() [E:\P4\RideUGS\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5625]
LogWindows: Error: [Callstack] 0x00007ff6c5ace5ac UnrealEditor.exe!GuardedMain() [E:\P4\RideUGS\Engine\Source\Runtime\Launch\Private\Launch.cpp:187]
LogWindows: Error: [Callstack] 0x00007ff6c5ace6ba UnrealEditor.exe!GuardedMainWrapper() [E:\P4\RideUGS\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:128]
LogWindows: Error: [Callstack] 0x00007ff6c5ad209e UnrealEditor.exe!LaunchWindowsStartup() [E:\P4\RideUGS\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:282]
LogWindows: Error: [Callstack] 0x00007ff6c5ae4e44 UnrealEditor.exe!WinMain() [E:\P4\RideUGS\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:339]
LogWindows: Error: [Callstack] 0x00007ff6c5ae80fa UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
LogWindows: Error: [Callstack] 0x00007ffcc0b2e8d7 KERNEL32.DLL!UnknownFunction []
We see almost the same crash. It happens in line 1465 instead of 1457 in Chaos::FPBDRigidsSolver::PushPhysicsState.
It is very rare. On PC three times a day in test builds. No helpful repro steps.
Thanks
If you still can’t access the official fix, I have inserted it below.
I haven’t tested it yet.
[Image Removed]
// If shapes are removed in the middle of the array, the logic in UpdateShapesArrayFromGeometry does
// not actually pack down the indices correctly as we've already removed the shape.
// Just force the indices to be correct here.
if (!InIndices.IsEmpty())
{
// These indices are sorted, we can start the fix-up at the first index.
const int32 FirstIndex = InIndices[0];
for (int32 I = FirstIndex; I < MShapesArray.Num(); ++I)
{
MShapesArray[I]->ModifyShapeIndex(I);
}
}
You may also consider trying CL 45956944 (https://github.com/EpicGames/UnrealEngine/commit/b8b0ee2e4e74bd0e92b1c3a1b6acb976662bbffd if you can’t see that) as this was another crash with welding.
Hey Markus, when asking around it sounds like that cvar is likely not valid, so I wouldn’t try it.
Are you still having issues or does it seem like things are fixed now?
Hi,
We haven’t seen the crash since integrating both changes.
Cheers,
Markus
Glad to hear it’s working. I closed the case, but if you run into more issues let us know.
Hi, then it’s most likely the same crash, I have put some debug prints to try to catch it in shipping that offset the numbers. When removing those the crash happened on line 1465.
I suggest start looking where you enable and disable collision on components that has siblings with collision. It might be something. In our case our collision hierachy looks like this:
DartBoard
- Dart
- Dart
- Dart
Then by disabling collision and unwelding a Dart, the crash happens (unwelding can be rotating, detaching). It’s much easier to reproduce if you destroy the dart. Note that we don’t set the weld flag manually, but they get automatically welded in Chaos just when attaching a actor to another actor.
Thanks,
I have added this fix and the the fix from https://github.com/EpicGames/UnrealEngine/commit/b8b0ee2e4e74bd0e92b1c3a1b6acb976662bbffd. In a short testing session I couldn’t reproduce the crash. We’ll do more stress testing soon, I’ll get back with the results if the solve our crashes.
I still get the ensures after enabling p.EnsureUnweldModifiesGTOnly. Should I just ignore those, and don’t touch the variable?
Cheers,
Markus