Search Unity

[2018.4 LTS] DirectX crash on standalone launch

Discussion in 'Editor & General Support' started by Oamm, Jan 8, 2020.

  1. Oamm

    Oamm

    Joined:
    May 15, 2016
    Posts:
    8
    Hello,

    We're encountering a DirectX crash issue after building and launching our standalone project. On both 2018.4.9f and latest 2018.4.14f. The editor launches fine.

    Taking a look at the crash report and callstack this is the information collected so far.

    Callstack:

    Unhandled exception thrown: read access violation.
    texture was nullptr.
    > UnityPlayer.dll!GfxDeviceD3D11Base::DrawQuad(float u0, float v0, float u1, float v1, ID3D11ShaderResourceView * texture) Line 2346 C++
    UnityPlayer.dll!D3D11SwapChain::BlitColorBackBufferToSwapChainBuffer(GfxDeviceD3D11Base & gfxDevice, ShaderChannelMask blitChannels) Line 838 C++
    UnityPlayer.dll!GfxDeviceD3D11Base::PresentFrame(ShaderChannelMask blitChannels) Line 1855 C++
    UnityPlayer.dll!GfxDeviceWorker::RunCommand(ThreadedStreamBuffer & stream) Line 1360 C++
    [Inline Frame] UnityPlayer.dll!ProcessGfxCommands(GfxDeviceWorker &) Line 161 C++
    UnityPlayer.dll!GfxDeviceWorker::RunExt(ThreadedStreamBuffer & stream) Line 497 C++
    [Inline Frame] UnityPlayer.dll!GfxDeviceWorker::Run() Line 481 C++
    UnityPlayer.dll!GfxDeviceWorker::RunGfxDeviceWorker(void * data) Line 461 C++
    UnityPlayer.dll!Thread::RunThreadWrapper(void * ptr) Line 76 C++
    [External Code]

    Stack Trace:

    ========== OUTPUTTING STACK TRACE ==================
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF97F379138)
    0x00007FF97F379138 (UnityPlayer) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF97F38B8C3)
    0x00007FF97F38B8C3 (UnityPlayer) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF97F37B73B)
    0x00007FF97F37B73B (UnityPlayer) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF97F3DC349)
    0x00007FF97F3DC349 (UnityPlayer) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF97F3E11CB)
    0x00007FF97F3E11CB (UnityPlayer) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF97F3E12A7)
    0x00007FF97F3E12A7 (UnityPlayer) (function-name not available)
    0x00007FF97F696E01 (UnityPlayer) UnityMain
    0x00007FFA123D7974 (KERNEL32) BaseThreadInitThunk
    0x00007FFA14BEA271 (ntdll) RtlUserThreadStart
    ========== END OF STACKTRACE ===========

    In the output_log.txt in the crash report, I believe this is the corresponding line that points to where the error begins:

    D3D11: Failed to create RenderTexture (0 x 0 fmt 27 aa 1), error 0x80070057
    (Filename: Line: 219)
    D3D11: Failed to create RenderTexture (0 x 0 fmt 19 aa 1), error 0x80070057
    (Filename: Line: 219)
    Crash!!!

    Let me know if you need any more information. Or if able to point us towards the problem area.

    Thanks!
     
    MihaPro_CarX likes this.
  2. Oamm

    Oamm

    Joined:
    May 15, 2016
    Posts:
    8
    Follow up => We identified the issue later on yesterday. We set device resolution through some properties we load in. It turned out it wasn't saving or loading Unity's Resolution class properly. Which on load it made it try to set: 0x0 0hz resolution - which this was causing the crash on standalone builds.
     
  3. GoSunCNAR1

    GoSunCNAR1

    Joined:
    Mar 25, 2020
    Posts:
    2
    Hello,
    We encountering the same error,but we may not have the same Unity's Resolution problem.Your team identified the issue in one day,that's very nice!Please would you advise me how to shot this problem.Or some ideas for shot this problem.
    Any suggestion will be really helpfull.
     
    MihaPro_CarX likes this.