Random CRASH PhysX ComponentHit

Hi guys,

I have this random crash when moving a physics object that fires the Hit event that I use to play the impact sound. Everything works fine but sometimes it just crashes the engine. Does the same on a packaged version.

The only thing that seems to be causing it in a particular level is the presence of the terrain/landscape and a static mesh on top of it. The Explosive barrel that hits the concrete ground of the static mesh has the terrain below it. I dunno if this has anything to do with it.

Here’s the crash info:

========================================================================================

LoginId:ae04c6114e5e25cad8107eab7ca9811c

EpicAccountId:3a19cb1a89de45ab85138756fbb98a3c

Unhandled exception

PhysX3CommonPROFILE_x64!physx::Gu::TriangleMesh::getTriangleMaterialIndex() [d:\build++fortnite\sync\engine\source\thirdparty\physx3\physx_3.4\source\geomutils\src\mesh\gutrianglemesh.h:97]

PhysX3PROFILE_x64!physx::NpShape::getMaterialFromInternalFaceIndex() [d:\build++fortnite\sync\engine\source\thirdparty\physx3\physx_3.4\source\physx\src\npshape.cpp:464]

UE4Editor_Engine!FPhysXSimEventCallback::onContact() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physxsupport.cpp:520]

APEXFrameworkPROFILE_x64!nvidia::apex::ApexSceneUserNotify::onContact() [d:\build++fortnite\sync\engine\source\thirdparty\physx3\apex_1.4\framework\src\apexsceneusernotify.cpp:235]

PhysX3PROFILE_x64!physx::Sc::Scene::fireQueuedContactCallbacks() [d:\build++fortnite\sync\engine\source\thirdparty\physx3\physx_3.4\source\simulationcontroller\src\scscene.cpp:4387]

PhysX3PROFILE_x64!physx::NpScene::fetchResults() [d:\build++fortnite\sync\engine\source\thirdparty\physx3\physx_3.4\source\physx\src\npscene.cpp:2325]

APEXFrameworkPROFILE_x64!nvidia::apex::ApexScene::fetchResults() [d:\build++fortnite\sync\engine\source\thirdparty\physx3\apex_1.4\framework\src\apexscene.cpp:1377]

UE4Editor_Engine!FPhysScene_PhysX::ProcessPhysScene() [d:\build++ue4\sync\engine\source\runtime\engine\private\physicsengine\physscene_physx.cpp:1235]

UE4Editor_Engine!TBaseRawMethodDelegateInstance<0,FPhysScene_PhysX,void __cdecl(enum ENamedThreads::Type,TRefCountPtr const &)>::ExecuteIfSafe() [d:\build++ue4\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:518]

UE4Editor_Engine!TGraphTask::ExecuteTask() [d:\build++ue4\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:842]

UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:686]

UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilIdle() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:593]

UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build++ue4\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:574]

UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build++ue4\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1505]

UE4Editor_Engine!UWorld::RunTickGroup() [d:\build++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:789]

UE4Editor_Engine!UWorld::Tick() [d:\build++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:1581]

UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1618]

UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:403]

UE4Editor!FEngineLoop::Tick() [d:\build++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3967]

UE4Editor!GuardedMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\launch.cpp:168]

UE4Editor!GuardedMainWrapper() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]

UE4Editor!WinMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:275]

UE4Editor!__scrt_common_main_seh() [d:\agent_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]

kernel32

ntdll

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Done! Thank you :slight_smile:

UPDATE: Tried in 4.23 (Preview 8), still crashes the same way.

UPDATE 2: Tried to put a simple Physics object instead of my BP actor, still the same issue. A certain amount of collisions or a certain type of collisions at the same time causes UE4 to freeze and crash… This is some serious issue. Can’t use Physics for this reason. Causes way too many frequent crashes…

If the STAFF needs my UE4 project, let me know. I really wan to solve this.

Are you still having this issue in 4.25? I just began experiencing it myself as I started placing physics actors around my levels. One too many physics actors OR one too many physics interactions and I get the exact same crash you posted above.

Outstanding! That fixed it for me. Turns out I accidentally enabled 2D Physics which was causing my problem. Thank you very much! :slight_smile:

In my case I’ve played with some parameters in the Physics section of the project settings and I screwed up something. I suggest you to create a blank project and export the Physics settings of the new project. Then import them inside your project. This will make sure you’re using the default settings for the Physics parameters. Restart UE and see if it happens again.

I really hope this helps.
Let me know. :slight_smile:

I’m glad it worked :smiley:

I’ve had exact same crashes in UE4.26.1 :

PhysX3CommonPROFILE_x64!physx::Gu::TriangleMesh::getTriangleMaterialIndex()
[d:\build++fortnite\sync\engine\source\thirdparty\physx3\physx_3.4\source\geomutils\src\mesh\gutrianglemesh.h:97]

I’ve determined that this exception occurs when “Enable Stabilization” is ticked in project settings → Engine - Physics → Simulation → “Enable Stabilization”.

331901-ue4-stabilization.png

Make sure to disable/untick it.

1 Like

I had the same crashes in 4.25, 4.26, maybe earlier, tried to disable this setting too and oops…
Every time the engine/editor starts this checkbox is checked again!
How can it even happen?

I’m sure you have fixed this issue already by now, but if not, you can edit the setting manually in the defaultengine.ini file. I was having a similar issue with changes reverting when i reopen the project in 4.27.

1 Like

Physx - Enable Stabilization = true, causing crashes has been a bug since 2018 at least. Even so Physx is still better than Chaos.

1 Like