Physics Constraint causes out of Memory crash

Physics Constraint Causes OOM Crash When Grabbing in VR

I’m using UE5.5 for a Quest 3 VR project. I grab weapons using Physics Constraints between a fully simulated hand and a fully simulated weapon. Over time, even with damping, substepping, and tight delta times, memory usage keeps growing until I hit an Out of Memory (OOM) crash.

The more complex the weapon (e.g. skeletal mesh), the faster it happens.

Anyone found a stable way to use constraints between two simulated objects in VR?

Are you doing something in a loop? Are you spawning the constraint or the object when grabbing? Out of memory exception usually means that your process demanded more RAM or VRAM than is available, that usually happens if you have ALOT of objects in the scene, or a lot of variables. Or too little RAM/VRAM in your system

HI well i test it in an empty Level, and i am not spawning anything aswell looping isnt happen.. its more like the Constraint is doing some calculations which are adding up and wrecking it. it happes when i grab a complex Gun or just a Baseball bat with 0 Logic, just slower. My SKM Hand is Simualting Physics and yes it has Collision as the Item which i hold t, and they are both in each other with collison on, which should be it right? But if i disable Collision in my PhysAsset fromt he Hand , so the Hand is not Physical Colliding anymore, it happens he same way…

Try profiling. Here are two workflow instruction files I personally created to help me profile in a straightforward manner. They might be a bit weirdly written so let me know if you don’t understand something.

Performance Profiling of the GPU using RenderDoc.txt (2.2 KB)
CPU Profiling WIF.txt (1.8 KB)

1 Like

Nice yes i will try that i just got this issue on the Quest , Native. But in Engine it may aswell Leak.

1 Like