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

QSGRenderNode::matrix() returns a dangling pointer in QSGRenderNode::render()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.6.0
    • 6.2.0
    • Quick: SceneGraph
    • None
    • 02e9a6b32 (dev)

    Description

      Calling `QSGrenderNode::matrix` in `render()` returns a dangling pointer.

      QSGRenderNode::m_matrix is assigned to a local stack variable in function `Renderer::prepareRhiRenderNode` (qsgbatchrender.cpp), but render() is called in `Renderer::renderRhiRenderNode`, so m_matrix now points to invalid stack space.

       

      Besides, Imho there really is no valid reason why matrix() returns a pointer. Comes Qt7, that should just return a QMatrix4x4 so this doesn't happen again. Maybe adding a new method returning QMatrix4x4 should be considered.

      Attachments

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

        Activity

          People

            janichol Andy Nichols
            giucam Giulio Camuffo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes