Occasional Freeze on Constraint Break Log Attached

This happens randomly. When a constraint breaks as it hits something physically while running in PIE. It hitches the entire application for 5-50 seconds, then resumes, outputting this in the log:

2016.01.20-22.25.53 [REDCARBON-5236] 01592.283: LogOutputDevice: === Handled error: ===

Ensure condition failed: GetShadowIndex() == 0 [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.10\Engine\Source\Runtime\Core\Public\HAL\IConsoleManager.h] [Line: 761]

Stack: 
UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:175]
UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\misc\outputdevice.cpp:276]
UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\misc\outputdevice.cpp:385]
UE4Editor-Engine.dll!TConsoleVariableData<int>::GetValueOnGameThread() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\hal\iconsolemanager.h:761]
UE4Editor-Engine.dll!UWorld::MarkActorComponentForNeededEndOfFrameUpdate() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\leveltick.cpp:776]
UE4Editor-Engine.dll!USceneComponent::PropagateTransformUpdate() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\scenecomponent.cpp:424]
UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorldWithParent() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\scenecomponent.cpp:357]
UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorld() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\scenecomponent.cpp:400]
UE4Editor-Engine.dll!USceneComponent::SetRelativeScale3D() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\scenecomponent.cpp:846]
UE4Editor-Engine.dll!USceneComponent::execSetRelativeScale3D() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\classes\components\scenecomponent.h:91]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\class.cpp:4198]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:484]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessContextOpcode() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1755]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\class.cpp:4198]
UE4Editor-CoreUObject.dll!UObject::ProcessEvent() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1053]
UE4Editor-Engine.dll!AActor::ProcessEvent() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\actor.cpp:580]
UE4Editor-Engine.dll!TMulticastScriptDelegate<FWeakObjectPtr>::ProcessMulticastDelegate<UObject>() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\uobject\scriptdelegates.h:459]
UE4Editor-Engine.dll!FConstraintInstance::OnConstraintBroken() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\physicsengine\constraintinstance.cpp:1219]
UE4Editor-Engine.dll!FPhysXSimEventCallback::onConstraintBreak() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\physicsengine\physxsupport.cpp:505]
APEXFrameworkPROFILE_x64.dll
PhysX3PROFILE_x64.dll
PhysX3PROFILE_x64.dll
PhysX3PROFILE_x64.dll
PhysX3PROFILE_x64.dll
APEXFrameworkPROFILE_x64.dll
UE4Editor-Engine.dll!FPhysSubstepTask::SubstepSimulationEnd() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\physicsengine\physsubsteptasks.cpp:418]
UE4Editor-Engine.dll!TBaseRawMethodDelegateInstance<0,FPhysSubstepTask,void __cdecl(enum ENamedThreads::Type,TRefCountPtr<FGraphEvent> const & __ptr64)>::ExecuteIfSafe() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:582]
UE4Editor-Engine.dll!TGraphTask<FDelegateGraphTask>::ExecuteTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\async\taskgraphinterfaces.h:797]
UE4Editor-Core.dll!FTaskThread::ProcessTasks() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:539]
UE4Editor-Core.dll!FTaskThread::ProcessTasksUntilQuit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:340]
UE4Editor-Core.dll!FTaskThread::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:690]
UE4Editor-Core.dll!FRunnableThreadWin::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]
UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:31]
kernel32.dll
ntdll.dll
ntdll.dll

Hello,

  • Could you explain a bit more detail what is happening before you see this ensure appear in your logs?
  • Do you have any steps that I can follow to reproduce this issue?
  • Does this also occur if you upgrade the project to the 4.11 Preview?
  1. So what I have configured it a vehicle that moves within a blueprint using physics, it has two legs, which are connected using physics constraints. Usually within the first hour of editing–>running in editor–>editing loop I’m moving about the world and my leg collides with another static or dynamic object, and the entire application freezes, hangs, and then usually around 30 seconds later, it comes back to life, with that constraint broken, and my vehicle exploded (broken leg = death after a few seconds in my game). At that time, it logs what it shows above.
  2. I can’t reproduce it consistently even in my setup, as it happens semi-randomly. It consistently occurs on the break of a constraint, but not every time one of those constraint breaks. Closer to 2% of breaks will freeze. When it breaks, I tried to do the same process again to reproduce it, and it didn’t happen. It’s very inconsistent. I also haven’t tested outside of editor to see if the same hang occurs. I can try more of these things tonight.

I did notice that when this happens my data drive (10,000rpm standard hard drive), which is where my game is located, is reading/writing at full speed, like its doing a lot of something on the drive. To verify that it wasn’t my drive somehow chugging, I tried it on my gaming laptop, and experienced the same freeze in the first hour of editing–>running in PIE.

I haven’t tried upgrading the project to 4.11 yet. I could try this

Since this seems like you may have a somewhat complex setup, if you could zip up your project and provide a link to Dropbox so that I can download it, that would allow me to take a look and see how I could reproduce this issue on my end. If you’re concerned about privacy, you can PM me on the forums: https://forums.unrealengine.com/member.php?160394-Sean-Flint

Also, definitely let me know the results of the further tests that you are performing.

I have sent you the project in a PM. Thank you!

Thank you for sending the project. I apologize for the delay.

Could you please provide a copy of your dxdiag?

Here’s my DxDiag for one of my PCs where it occurs.

Okay. Sure, I’ll try to capture a video of it happening.

Currently, we have been unable to reproduce the crash or hang that you are seeing in your project. Would it be possible for you to provide a video so we can see how you are reproducing the issue on your end?

Here you go! Hope this helps. I loaded the project, ran in new window, flew up a bit, and that’s where the video starts.

Thank you for providing that video. On our end, we’re not seeing the freeze that you are experiencing, which leads me to believe that it could be related to hardware. You said you tried this on multiple PC’s, could you provide the dxdiag(s) of the other(s) as well?

Here’s the DxDiag for my desktop PC, which also has the issue. I can try it across a couple other machines I have, if that would help narrow it down.

Are you noticing high memory usage on either PC when the freeze occurs?

I just tried a few times and did notice a significant jump in memory usage on my desktop. It sits around 700,000-900,000 K until it hangs, and immediately jumps up to 2,350,000 K. I also found that having the LanderPawn blueprint open on one of my other screens seemed to make it happen more consistently from project startup.

My process was:

  1. Open Project
  2. Open Blueprints/Lander/LanderPawn (mine opened to “UpdateRotationThrust” function, if that’s relevant)
  3. Fly, hit stalagmite
  4. Reset (R on keyboard, of Y on controller)
  5. Fly, hit stalagmite, Freeze, memory spike for UE4Editor.exe to 2,350,000 K

I recorded a video of my process (using my phone since fraps doesn’t handle full screen desktop capture).

All I had open was Epic Games Launcher and Task Manager. Here’s a screenshot of all running processes when editor is open.

Thank you for providing the additional information. I have run through your steps one more time using your project, and I have not been able to reproduce the freeze. I didn’t see a significant jump in memory on our end.

One thing you could try is updating your graphics card drivers, as it is possible that this is causing the freeze.

I’ll try updating my graphics card drivers, but I doubt its a driver issue if it is happening across both of my machines (laptop and desktop).

Thanks again for all your efforts so far. Is there any idea how to find out what exactly is causing that memory spike? And any way to prevent it? I feel like this is more of how it is handling the instant massive jump in load (like a memory leak).

If it’s any help, I also notice that memory seems to hop up in 6,000 K increments whenever I run the application after that point. It really feels like a memory leak in either UE4, or somehow in my blueprints.

Later today, I’ll try stripping down all of my onCollisions to see if I can narrow down a problem-causer within any of my onCollision calls.

Also, is there anything I could do to log out any other pertinent information, which could be more helpful on your end, since I can reproduce it very consistently on my end?

Earlier in the conversation, I suggested trying the project in the 4.11 Preview. Did you ever get a chance to try that? If so, what were the results?

I have currently reproduced the freeze one time out of a large number of attempts. I am going to continue seeing if I can determine what exactly is causing the freeze to occur, as it seems to be quite random and inconsistent as far as when it appears.

I’ll try that tonight and report back.

Great that you’ve been able to reproduce it once! That’s very promising!! I’ve found that after having it happen, it will be a long time before it occurs again unless you reload the project. Something about that first time it hits that critical spike in memory. Thanks again!