PhysX crash in UE, bug is fixed in nVidia PhysX 3.3.4 SDK

Hello,

this post is a bit weird but I think this is the only way to explain clearly what I ran into today.

Preamble: UE 4.12 is uses PhysX 3.3.4; however if you download the 4.12.5 release from Epic’s github, some PhysX source files are different from the ones that you can download from nVidia’s github (https://github.com/NVIDIAGameWorks/PhysX-3.3 ; you need to be part of GameWorks organization to access it).

Example: Unreal Engine’s file “Engine\Source\ThirdParty\PhysX\PhysX-3.3\Source\LowLevel\software\src\PxsConstraintPartition.cpp”, line 731, is different from the one provided by nVidia as part of PhysX 3.3.4 SDK.

The issue: I am currently using Unreal Editor 4.12.5, compiled from github sources ( https://github.com/EpicGames/UnrealEngine/archive/4.12.5-release.zip ). The UE PhysX sources I am referring to are the ones downloaded by running the setup.bat contained in the zip file.

I managed to trigger a bug that lead to an editor crash by assembling a particular PxScene, but this bug has been fixed in nVidia’s PhysX SDK. You can diff the file that I cited as an example to see the fix. Would it be possible to have this fix ported to UE’s PhysX sources as well?

Let me know if you need a minimal unreal project that crashes the engine, I’ll produce one. I can also produce an example to be run on the nVidia’s SDK that shows that the same PhysX scene does not cause a crash on their version.

Hello,

I am currently investigating this issue, and will respond back as soon as I have new information.

Thanks!

If you could provide a project, as well as include the steps we need to follow in the project to cause the crash, that would be fantastic.

Here is a zip file with a minimal project, and those are the steps:

-Extract the folder

-Open the PhysX_crash_334.uproject with Unreal Editor 4.12.5, launcher version.

-Let the editor compile the dll

-In the editor, load the TestLevel located in the Content folder

-[Optional] if you have PhysX Visual Debugger installed, you can open it to record the physX scene that will be created. You need to manually give the “Pvd connect” console command before starting the PIE

-Start the Play In Editor

After just a few frames the editor will crash. If PVD was open and connected, the previous frames will be visualizable. The stacktrace points to an out-of-bounds array access inside a function in the PhysX internals. The scene that I’m loading is not very complicated, is simply a plane with five (very small) tetrahedra linked together by PhysX joints. I know it has stability problems due to scale, but if the Example file that I mentioned in the bug report is “patched” to be the same as the nVidia PhysX 3.3.4 SDK, the crash does not happen anymore.

Thank you very much for your time!

Hello,

I’ve reproduced the crash in your project, and entered a bug report, UE-33927. Thank you for your report.

Have a great day

@sean i am trying to find this issue in the tracker but it doesn’t seem to exist.

It just needed to be pushed to public. Here you go: Unreal Engine Issues and Bug Tracker (UE-33927)

Have a great day!