Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99477

Crash in QRhiD3D11::executeCommandBuffer with nullptr access

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.2.0, 6.2.1, 6.2.2
    • Fix Version/s: 6.3.0 Alpha, 6.4.0 Beta1
    • Component/s: Qt RHI
    • Labels:
      None
    • Environment:
      Windows 10
    • Platform/s:
      Windows
    • Commits:
      8ef13f73de (qt/qtdeclarative/dev) 7b400b8720 (qt/qtdeclarative/6.3) 93a33519de (qt/qtdeclarative/6.2) 8ef13f73de (qt/qtdeclarative/wip/iosstyle) 93a33519de (qt/tqtc-qtdeclarative/6.2)

      Description

       

      *crash堆栈:   dx接口调用QRhiD3D11::executeCommandBuffer传递过来的ID3D11Buffer空指针导致crash*

       

      这个crash有点类似另一个crash:  https://bugreports.qt.io/browse/QTBUG-98363

      但此处crash最终表现在ID3D11Buffer被QRhiD3D11::executeCommandBuffer使用时crash,https://bugreports.qt.io/browse/QTBUG-98363的crash是在QRhiD3D11::enqueueResourceUpdates时就被memcpy使用而crash;

       

      crash原因大概分析:

      1.  在dx设备丢失情况下, Renderer::unmap 尝试将Buffer继续使用,调用buffer->buf->create() 而没有做异常处理,导致Buffer在后续使用时没判断里面保存的ID3D11Buffer 对应的指针而触发crash

       2. crash时,qt打印的warning日志, 对应着上面两段代码的warning日志, 0x887a0005错误码:  GPU 设备实例已经暂停

       

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-99477
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              lagocs Laszlo Agocs
              Reporter:
              husoul soul hu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes