GPU Crash when playing a VFX made with the VFX Graph (Editor & Player)

I reported a critical crash bug with a repro project to Unity this morning happening using VFX graph (14.0.4) on NVIDIA GPUs (doesn’t happen on AMD GPUs), in Player.
We also have crashes in the Editor that we think are related to the same thing, but the error is more generic:

Failed to present D3D11 swapchain due to device removed

We tried to change the project version from 2022.2.1 to 2022.2.10 and 2023.1.0 and still encountered it.
It is a random crash when playing VFX with a reproduction rate something like 1 out 20 times.

We reproduced it on both Windows 10 and Windows 11, on DX11, DX12 and Vulkan graphics API.
Also happens more on macOS, Metal.

The error that we sometimes see in the Player.log is:

D3D11: Failed to create RenderTexture (1 x 1 fmt 53 aa 1), error 0x887a0005
d3d11: failed to create buffer (target 0x5 mode 1 size 1280) [0x887A0005]
d3d11: failed to create buffer (target 0x2 mode 1 size 60) [0x887A0005]
d3d11: failed to create buffer (target 0x1 mode 1 size 26680) [0x887A0005]
d3d11: attempt to lock null buffer
D3D11: Failed to create RenderTexture (4096 x 4096 fmt 53 aa 1), error 0x887a0005
D3D11: Failed to create RenderTexture (1 x 1 fmt 53 aa 1), error 0x887a0005

or

D3D11: Failed to create RenderTexture (1920 x 1080 fmt 27 aa 1), error 0x887a0005
D3D11: Failed to create RenderTexture (1920 x 1080 fmt 19 aa 1), error 0x887a0005
d3d11: failed to create buffer (target 0x5 mode 1 size 1280) [0x887A0005]
d3d11: failed to create buffer (target 0x2 mode 1 size 60) [0x887A0005]

We still don’t know the exact cause, but doesn’t seem related to a specific VFX.

Anyone else noticed this?

We use GPU Events on all of our VFX. It could be related to this thread: 1277585: Major crash on some GPUs if "trails" are used
But we don’t use trails.

We managed to reproduce it on those:
NVIDIA GeForce GTX 1080, driver 31.0.15.3129
NVIDIA GeForce GTX 1660 Ti, driver 31.0.15.2756
NVIDIA GeForce RTX 2060, driver 31.0.15.3129
NVIDIA GeForce RTX 2070, driver 31.0.15.3129
NVIDIA GeForce RTX 3070, driver 31.0.15.2756
NVIDIA GeForce RTX 3070, driver 31.0.15.1694
NVIDIA GeForce RTX 3090, driver 31.0.15.3129

3 Likes

@AdrienVR Do you mind sharing incident ticket here with us? I could take more in-depth look.

Sure, here it is: Jira Service Management

Are there any updates on this?

We are also seeing this issue in Unity 2022.2.4f1. One of the systems has a Trigger Event Rate (Over Time) that trigger a GPU event which initializes a particle strip. It appears to be random as to when it decided to crash

Hi @Q-Ted
If you check that link to the ticket, you can see that it was fixed in 2022.2.21f1.
That particular issue was actually caused by VFX outputs that cast shadows.
There has been some other fixes as well, would it be possible for you to test your VFX in one of the newest releases of 2022.2 or 2022.3?
Thank you!

P.S.: Thanks @AdrienVR for the repro, it helped a lot!

2 Likes

We switched to 2022.2.21f1 since it released and we didn’t reproduce so far, thanks!

Thanks great to hear and thanks for the quick response. I will update our team to the most up-to-date version of 2022.2.

Btw, I cannot access that link as I do not have permission to view that request.

Indeed, the public issue tracker link is:

2 Likes

Was this bug fixed in 2021 version? I get it in 2021.3.43

Hi @krol1 ,

This particular issue was a consequence of some changes in 22.2 version. If there was something related to this before, it was never reported.

However, it is possible to have the same error message for totally different reasons.

That generic error message (device removed) indicates that something went wrong on the GPU, typically a GPU hang, which removes the device after some seconds not being responsive.

Unfortunately, 2021.3 is out of support, so it won’t be fixed. If you provide some more information about your issue, we can try to see if there are any workarounds. The best option would be upgrading when possible.

Have a nice day!