Unity crashes during build when using DX12

Hi,
I tried to switch my project to DirectX 12 so I can use Split Graphics Jobs, but when I try to build the project it crashes like 5 minutes in when building the scenes (build usually takes 25min, it is a big
project).
The crash is related to memory usage and I can see when building the game with DX12 the memory increases like crazy.

Is there some kind of workaround or is it a known bug/issue? Seems like DX12 is not usable at all for bigger projects.

Bellow is the crash log and dmp file.
Crash_2024-10-18_060522361.zip (1.5 MB)

Thanks.

same here! Any update on this?
using Unity 6 (.23f) and URP

Yes I also have this issue, and I’ve seen many messages on Reddit with the same issues.

CrashDMP:
Exception Code :0xc0000005
Exception Information: "The thread tried to read from or write to a virtual address for which it does not have the appropriate access."

Editor.Log:
[./Library/PackageCache/com.unity.collections/Unity.Collections/Memory.cs line 89]
Invalid memory pointer was detected!```

Seems to be fixed in Unity 6.1.0b2. My builds are properly building and unloading memory during build.

Not fixed in new 6.1 Currently have this issue with 50series GPU.

Please report a bug on this with your project. It is very likely that something in your project specifically is triggering it and we cannot fix it without knowing what it is.

I have - like 13 crashes in 6 hours.
[AutisticReaction] on this reddit post

Regarding changing Memory.cs:88 in the main project files from if (oldCount > 0) to if (oldCount > 1)
Seems to somewhat helped with the crashes. There are several memory leaks coming from the Spline Package when using the Leak Detection.

Also, 50 series seems to have an issue in general with DX12 - even with the latest drivers, and Unity 6 crashes in RayTracing seems to be quite prevelant.

The code that you changed has nothing to do with DirectX 12. If that resolves the crashes, then the problem wasn’t DirectX 12 in the first place.

But yeah we need a bug report to dig into this.