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

QRhi declares types with non-relocatable QVLA in them as relocatable which can lead to crashes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.2.0 RC
    • Fix Version/s: 6.2.0
    • Component/s: Qt RHI, Quick: SceneGraph
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      481bc82d5931d5c715c2e889da6f249aa88057de (qt/qtbase/dev) 371e6abb963e12178f58f8356c51d3c82dcd2e60 (qt/qtbase/6.2) 1d739875054746a95d4dcf45320d48322b0dd071 (qt/qtbase/6.2.0)

      Description

      My QtQuick based application crashes on Qt 6.2.0-rc1 with the following stack trace:

       	Qt6Guid.dll!QRhiTextureSubresourceUploadDescription::destinationTopLeft() Line 548	C++
       	Qt6Guid.dll!QRhiD3D11::enqueueSubresUpload(QD3D11Texture * texD=0x0000017ae2e211f0, QD3D11CommandBuffer * cbD=0x0000017acab90970, int layer=0, int level=0, const QRhiTextureSubresourceUploadDescription & subresDesc) Line 1364	C++
       	Qt6Guid.dll!QRhiD3D11::enqueueResourceUpdates(QRhiCommandBuffer * cb=0x0000017acab90970, QRhiResourceUpdateBatch * resourceUpdates=0x0000017aca21e280) Line 1514	C++
      >	Qt6Guid.dll!QRhiD3D11::resourceUpdate(QRhiCommandBuffer * cb=0x0000017acab90970, QRhiResourceUpdateBatch * resourceUpdates=0x0000017aca21e280) Line 1739	C++
       	Qt6Guid.dll!QRhiCommandBuffer::resourceUpdate(QRhiResourceUpdateBatch * resourceUpdates=0x0000017aca21e280) Line 5532	C++
       	Qt6Quickd.dll!QSGBatchRenderer::Renderer::prepareRenderPass(QSGBatchRenderer::Renderer::RenderPassContext * ctx=0x0000017acab9b810) Line 3670	C++
       	Qt6Quickd.dll!QSGBatchRenderer::Renderer::render() Line 3407	C++
       	Qt6Quickd.dll!QSGRenderer::renderScene() Line 177	C++
       	Qt6Quickd.dll!QSGDefaultRenderContext::renderNextRhiFrame(QSGRenderer * renderer=0x0000017acab9b520) Line 212	C++
       	Qt6Quickd.dll!QQuickWindowPrivate::renderSceneGraph(const QSize & size={...}, const QSize & surfaceSize={...}) Line 680	C++
       	Qt6Quickd.dll!QSGRenderThread::syncAndRender() Line 787	C++
       	Qt6Quickd.dll!QSGRenderThread::run() Line 990	C++
       	Qt6Cored.dll!QThreadPrivate::start(void * arg=0x0000017aca23e1c0) Line 329	C++
      

      It is an "Read access violation: this was 0xFFFFFFFFFFFFFFCB" where 'this' refers to the QRhiTextureSubresourceUploadDescription object.

      The bug seems not to be in the QRhi D3D backend itself, because the same crash happens when using the QRhi OpenGL backend. So I assume the scene graph layer sets up the texture upload description the wrong way or so...

      I cannot publish the source and have unfortunately no minimal test case to reproduce. Please tell me if there is anything else I can do to provide more info.

        Attachments

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

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            tokoe.kdab Tobias Koenig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes