Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Visual Effect Graph' started by AdrienVR, Mar 20, 2023.

  1. AdrienVR

    AdrienVR

    Joined:
    Apr 6, 2016
    Posts:
    17
    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:
    Code (CSharp):
    1. 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:
    Code (CSharp):
    1. D3D11: Failed to create RenderTexture (1 x 1 fmt 53 aa 1), error 0x887a0005
    2. d3d11: failed to create buffer (target 0x5 mode 1 size 1280) [0x887A0005]
    3. d3d11: failed to create buffer (target 0x2 mode 1 size 60) [0x887A0005]
    4. d3d11: failed to create buffer (target 0x1 mode 1 size 26680) [0x887A0005]
    5. d3d11: attempt to lock null buffer
    6. D3D11: Failed to create RenderTexture (4096 x 4096 fmt 53 aa 1), error 0x887a0005
    7. D3D11: Failed to create RenderTexture (1 x 1 fmt 53 aa 1), error 0x887a0005
    or

    Code (CSharp):
    1. D3D11: Failed to create RenderTexture (1920 x 1080 fmt 27 aa 1), error 0x887a0005
    2. D3D11: Failed to create RenderTexture (1920 x 1080 fmt 19 aa 1), error 0x887a0005
    3. d3d11: failed to create buffer (target 0x5 mode 1 size 1280) [0x887A0005]
    4. 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: https://forum.unity.com/threads/1277585-major-crash-on-some-gpus-if-trails-are-used.969552/
    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
     
    spockTheGray, Meatloaf4 and Keymih like this.
  2. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    @AdrienVR Do you mind sharing incident ticket here with us? I could take more in-depth look.
     
  3. AdrienVR

    AdrienVR

    Joined:
    Apr 6, 2016
    Posts:
    17
  4. Q-Ted

    Q-Ted

    Joined:
    Dec 16, 2016
    Posts:
    46
    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
     
  5. gabriel-delacruz

    gabriel-delacruz

    Unity Technologies

    Joined:
    May 19, 2021
    Posts:
    36
    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!
     
    AdrienVR and Vita- like this.
  6. AdrienVR

    AdrienVR

    Joined:
    Apr 6, 2016
    Posts:
    17
    We switched to 2022.2.21f1 since it released and we didn't reproduce so far, thanks!
     
  7. Q-Ted

    Q-Ted

    Joined:
    Dec 16, 2016
    Posts:
    46
    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.
     
  8. AdrienVR

    AdrienVR

    Joined:
    Apr 6, 2016
    Posts:
    17