Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Other Unity Build Crash | D3D11: Failed to Create RenderTexture ... error 0x887a0005

Discussion in 'Editor & General Support' started by EnUddaGamer, Sep 11, 2023.

  1. EnUddaGamer

    EnUddaGamer

    Joined:
    Nov 11, 2016
    Posts:
    6
    Hello everyone,

    I'm part of a smaller team currently developing a game where you explore the world as a shipcaptain from the timeperiod of golden age of piracy. Here we have several rendertextures, where all of them comes from Synty Studios Pirate Pack and Stylized Water 2. These are respected and well-developed textures and/or shaders which haven't generated this type of issue in of themselves as far as I can see.

    The error that occurs is an entire crash of either the Editor, but more frequently, the built game (.exe).

    What happens when the crash occurs?
    The game slowly but surely starts to decrease in performance, making the FPS lesser and input responsiveness worse, before crashing completely.

    What affects does the crash have on the computer?
    After the crash has occured, the entire PC acts odd. Network might be down for a bit making services such as Discord crash as an result of this. The only resolution is to restart the PC when the game has crashed.

    What do I think the issue might be?
    Since the entire PC gets affected from a gamecrash, memory leaks seems like a reason for it happening, but when checking the memory usage once the game starts to crash, it does not spike.

    Crash logs:
    <RI.Hid> Failed to start reading input report:
    Insufficient quota to complete the requested service.
    D3D11: Failed to create RenderTexture (350 x 350 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 19 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 19 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (175 x 175 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (350 x 350 fmt 60 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 26 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 26 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 19 aa 8), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 19 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (960 x 540 fmt 26 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 27 aa 1), error 0x887a0005
    D3D11: Failed to create RenderTexture (1920 x 1080 fmt 60 aa 1), error 0x887a0005

    This log gets repeated several times until "Crash!!" appears in the log.

    The crash does not seem to occur any less frequently with different hardware either, as we've tried different computers. Drivers are not any concern really here either, since we've tried several different ones, hence the post here in a cry for help.

    If anything else is needed from me, such as logs or more info regarding crashes, feel free to comment. I'll provide it quite quickly.

    Kind regards,
    Victor
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    This smells like you may be requesting more of whatever this resource is from D3D11 than is available.

    That would likely be a good place to begin your investigation.

    Perhaps someone with better knowledge of what D3D resources are involved when a RenderTexture is used can add something here.
     
  3. EnUddaGamer

    EnUddaGamer

    Joined:
    Nov 11, 2016
    Posts:
    6
    Hello Kurt,

    I appreciate the response. However, I am having a difficult time pin-pointing what this supposed resource might be. Especially since the assets I'm using are made from talented people, with released games using them as well. Any idea of how locating this resource could be done?

    Kind regards,
    Victor
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    Talented people write bugs too.

    Talented people allocate more memory than they have available.

    Talented people ask the video card to do things it cannot.

    The list is endless.

    You have an engineering issue. It's time to focus on engineering a solution rather than looking for reasons it cannot possible exist and that Unity should somehow fix it for you.

    Bisection is always a good approach. If you suspect resource X (I think you listed RenderTextures?) as being an issue, then reconfigure to use twice as many of them as you are now. Does the problem get massively worse? GREAT! You may have found your issue. Now you can go talk to your talented people about why that blows up.

    If not, maybe it's something else. Keep looking. And like I said, don't hesitate to put every single error message and clue into Google. You will NEVER be the first person to see a problem.
     
  5. EnUddaGamer

    EnUddaGamer

    Joined:
    Nov 11, 2016
    Posts:
    6
    Yes, talented people makes mistakes as anyone else would as well. I'm just surprised to not see any other similar issues with these packs specifically. Will keep working though, and follow your tips.
     
  6. crawfis

    crawfis

    Joined:
    Jan 30, 2014
    Posts:
    102
    We were (are) getting the same issue. I thought it was some errors in the StylizedWaterShader 2. We just updated and it solved some problems, but I just got the error on a build as well. More likely though it is a resource issue. We are right at the maximum memory (trying to find the memory leak) and it happens when memory is exhausted as @Kurt-Dekker seems to suggest. On Windows I can use the Task Manager to see the memory increase.
     
  7. crawfis

    crawfis

    Joined:
    Jan 30, 2014
    Posts:
    102
    Actually, playing around with this more. Our Cloud Build using Unity's DevOps had the memory leak, but a local build did not. I just did a Cloud Build without caching (a Clean Build) and the memory leak is gone. Not sure if that is your problem, but my guess is that Unity's cache is faulty with Addressables and switching profiles from iOS to Windows to Android. Hope that helps.