Since 5.3 I get "out of memory" crash using dx12 RHI.

Since 5.3 I get “out of memory” crash using dx12 RHI. If I use DX11 RHI there is no problem. Is there a memory leak in the 5.3 engine? It’s the only thing i can think of, as i’m not doing anything within the engine that would require additional VRAM at the point it crashes. Obviously there is no log generated on an out of memory crash. I can provide DXDIAG if it helps?

I apologize if this is in the wrong category, but since i can no longer post in ‘General’ it seemed the best category.

Meh, i’ll just add the DXDIAG.

DxDiag.txt (136.1 KB)

What do i have to do to get a response? Are no Engine representatives willing to chime in, in case there is an issue with the engine? 53 views so far and not one response.

you have any monitoring tools? i mean… task manager should be enough to get a vram readout. 8 GB is not a lot by todays standards - especialy feeding a 4k monitor. tbf it runs great on less, if setup correctly. vsm is quite hungry. does not run well on 6 GB. not sure about 8 GB. this may be your culprit. or the monitor resolution. screen percentage fixes that. smaller gbuffers. yep

in the first place… have you updated graphics drivers and mobo to latest stable versions?

you may just load a starter map and check engine stats. there is simple and a detailed dx12 rhi memory stat in the list. then add some stuff and see if it holds. on thee average system you get an “exhausted memory and performance” warning. it should not crash. unless maybe it’s severly overloaded.

yeah, gonna upgrade gpu, Driver updated yesterday. But like i said in the first post, theres nothing happening that would require extra GPU. As far as task manager goes, well if thats what i need to do, i’ll keep it open at all times and log what is happening when it happens.

My streaming pool is set to 2gb. Its never filled.

On DX11 no problems at all. On DX12 no “exhausted memory” warning. Just crash. Also same crash with vulkan if it helps.

If i look in ‘resource usage’, within the engine i get:

TOTAL:
Loaded
Count = 9000
Time(sec)=112.5
Size(MiB)=1415.9

Build:
Never built. (All values 0)

I’m Not using anywhere near even my 8gb. The level i’m working on is mainly just the loading screen.

So Is the possibility that the engine has a memory leak so unbelievable?

Just as an addition, i have attempted to delete files, or move them (Before you say it, not even referenced. Just cleaning up packages i have downloaded, YES i can delete them in windows, BUT if thats the proper use for deleting content why have the delete option in engine), the engine freezes, i go to task manager and just watch the engine chew ram, with VRAM usage as just above zero.
I continue to watch ram usage climb to as much as 20gb ram, i lose control of OS and can only hard reset.

I’m also going to add, all my static objects are nanite enabled (why i need dx12), all my textures are set to never stream = no. NO foliage. Possibly 16 animated pawns on screen at once ( haven’t even added AI yet). I admit they are high poly, but seeing as i have them on screen for up to an hour before the crash, i don’t see the problem. Also, the fact I can use DX11, on the exact same project, without any interruptions.

Lastly, thank you for responding at all. I’m still wondering why an engine moderator has nothing to say.

if you loose control of the OS it’s more likely a RAM or pagefile issue. the OS crashing is what usually never happens or should not happen. the applications are supposed to start to crash first. be it ue5 or chrome or whatever is running. (i crashed the OS “on purpose” once. that was a singular (unity) game running the whole system out of memory. it was totally under spec tho.)

so… i’d say go verify that the pagefile size is good as a backup memory buffer. to keep the OS from running out. also consider using a memory cleaner (like emptystandbylist on a schedule). windows is rather sloppy cleaning up garbage memory. nanite is fairly hungry. (it runs with 16 GB RAM and 6 GB of VRAM tho. i ran the valley demo in editor once.) in general lots of highpoly assets will consume heaps of memory. so you should test if lower amounts of detail make it more stable.

But why does DX11 work flawlessly whilst dx12 doesn’t?

But why does DX11 work flawlessly whilst dx12 doesn’t? Why is the OS crashing at all from a project using less than 2gb vram?

dx12 has more features. i’d have to go thru a whole config process to find the differences, but i’m sure it’s allocating more resources for certain things.

if you can run your game in dx11 and stable and it looks and performs as you want, you don’t need to use dx12. just saying.

As far as i knew nanite requires dx12. As i said, this is pretty much my loading screen, i will need nanite for the rest of the game. So in DX11 i can’t preview nanite, but it is it actually working behind the scenes?

no. nanite will not work in dx11. you’d have to use the “old” lod system and limits.

that’s why you should try with lower details in dx12 first. figure out what is too much for your system.

Well, thanks for the advice, but when my level is using 2gb vram, I still don’t see the problem.

I have a 1080p monitor and a 720p monitor connected to this pc so i will try out different resolutions.

LOL i mean if it will fix the issue i’ll go buy a 24gb GPU tomorrow. But 24gb to get 2gb to work is a bit much.

I’ll follow your advice and keep system monitor open, and i’ll log whatever is happening at crash and continue to update this thread.

Thank you again for your input.

i’m pretty sure you use more then 2 GB while playing it back. the engine has render buffers. lumen has compute buffers. nanite uses geometry buffers on the gpu. and streaming pools. while not all of this may be allocated all the time you have a core memory footprint of the engine that’s higher then that.

also… you’re using a 4k screen. that’s peak ~500 MB just for a 2560x1440 editor viewport and the full precision gbuffer. and you use a 1920x1080 and a 1680x1050 screen on the side. all of those require gpu memory to render the UE5 editor UI if you have windows moved over to them.

for sh*ts and giggles. blender loaded with a full geo SD at ~7GB/1.6GB. and a semi heavy foliage spammed scene rendering in UE5 at ~8GB/whatever is left. it’s not even using compact nanite meshes. resource management is a thing. memory has limits you gotta be aware of.

Thanks for your response and sorry for the delay, and yes i do understand there are underlying factors in what memory i would expect and what is. But following your advice I reliably get a crash on dx12 at 2% gpu (from system monitor), whereas DX11 no problems ever .

I believe the new nanite is the problem, as 5.0-5.2 had no problems with dx12(and that project had a fully destructible chaos environment).

Thing is, i have so many nanite ready assets, it would take a ridiculous amount of time to ‘un-nanite’ them, unless you can matrix edit them? not sure if nanite is a matrix option?

If i could determine if my project doesn’t crash minus nanite, we might get somewhere, is it a matrix option i’m not seeing?