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

Crash in QSGOpaqueTextureMaterial::setTexture when using Canvas

    XMLWordPrintable

Details

    • 5762738fce7306120c1d93da84ef9c2693d95881

    Description

      The following code will crash if eeee9f1466ffaf17f81d635c2e43dca76ce5b021 is not reverted:

      import QtQuick 2.2
      import QtQuick.Controls 1.2
      
      ApplicationWindow {
          id: window
          width: 640
          height: 480
          visible: true
      
          property real minimumValue: 0
          property real maximumValue: 100
          property real currentValue: 0
      
          Timer {
              interval: 500
              repeat: false
              running: true
              onTriggered: {
                  var v = currentValue + 10
                  if (v > maximumValue)
                      v = minimumValue
                  currentValue = v
              }
          }
      
          Canvas {
              id: theCanvas
              anchors.fill: parent
      
              property real radius: 100
              property real pct: (currentValue - minimumValue) / (maximumValue - minimumValue)
      
              onPctChanged: theCanvas.requestPaint()
      
              onPaint: {
                  var ctx = theCanvas.getContext("2d")
                  ctx.clearRect(0, 0, 2 * radius, 2 * radius)
              }
          }
      }
      
      0	??			0x70	
      1	QSGOpaqueTextureMaterial::setTexture	qsgtexturematerial.cpp	195	0x7fffe7439b4b	
      2	QSGSimpleTextureNode::setTexture	qsgsimpletexturenode.cpp	229	0x7fffe7438c15	
      3	QQuickCanvasItem::updatePaintNode	qquickcanvasitem.cpp	765	0x7fffe75dfdee	
      4	QQuickWindowPrivate::updateDirtyNode	qquickwindow.cpp	2984	0x7fffe74b5a70	
      5	QQuickWindowPrivate::updateDirtyNodes	qquickwindow.cpp	2722	0x7fffe74b4731	
      6	QQuickWindowPrivate::syncSceneGraph	qquickwindow.cpp	341	0x7fffe74a853a	
      7	QSGRenderThread::sync	qsgthreadedrenderloop.cpp	515	0x7fffe74736e4	
      8	QSGRenderThread::syncAndRender	qsgthreadedrenderloop.cpp	561	0x7fffe7473bac	
      9	QSGRenderThread::run	qsgthreadedrenderloop.cpp	677	0x7fffe7474814	
      10	QThreadPrivate::start	qthread_unix.cpp	331	0x7ffff695cc27	
      11	start_thread	/usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.19.so	312	0x7ffff56ae182	
      12	clone	/usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so	111	0x7ffff60ba47d	
      

      Attachments

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

        Activity

          People

            tokoe.kdab Tobias Koenig
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes