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

Repeated texture readbacks crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.8.3, 6.9.0 Beta3, 6.10.0 FF
    • 6.8.0, 6.8.2, 6.9.0 Beta2
    • Qt RHI
    • None
    • Windows 11, Visual Studio 2022
    • Windows
    • 68e48ac60 (dev), 987ff07a8 (6.9), fd78ec987 (6.8), 037e4f9a5 (dev)

    Description

      There may be a bug in the RHI D3D12 backend.
      I wrote a test program that starts a texture readback in each frame.
      Here is what happens with different Qt versions and different RHI backends:

      Qt 6.8.0, 6.8.2:
          OpenGL: works
          D3D11:  works
          Vulkan: crashes in QRhiVulkan::finishActiveReadbacks
          D3D12:  crashes in QRhiD3D12::finishActiveReadbacks

      Qt 6.9.0 Beta 2:
          OpenGL: works
          D3D11:  works
          Vulkan: works
          D3D12:  crashes in QRhiD3D12::finishActiveReadbacks
          
      Here is the output I get in the console window with Qt 6.9.0 Beta 2 and different backends:

      OpenGL, D3D11:
          Readback 0 started
          Readback 0 complete
          Readback 1 started
          Readback 1 complete
          Readback 2 started
          Readback 2 complete
          Readback 3 started
          Readback 3 complete
          Readback 4 started
          Readback 4 complete
          ....

      Vulkan:
          Readback 0 started
          Readback 1 started
          Readback 0 complete
          Readback 2 started
          Readback 1 complete
          Readback 3 started
          Readback 2 complete
          Readback 4 started
          Readback 3 complete
          ...

      D3D12:
          Readback 0 started
          Readback 1 started
          Readback 0 complete
          Readback 2 started
          Readback 3 started
          C:\Repos\ReadBackIssue\x64\Release\ReadBackIssue.exe (process 5796) exited with code -1073741819 (0xc0000005).

      I am using Windows 11 and Visual Studio 2022.
      The test code can be downloaded from https://github.com/jrade/ReadBackIssue.
      The backend can be changed in Main.cpp.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            jrade Johan Råde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes