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

Canvas: setting shadowBlur before calling fillText causes assertion failure

    XMLWordPrintable

Details

    • 7b7b0b30fce3a72e472a05052cf8221ebaa83459

    Description

      import QtQuick 2.0
      
      Item {
          id: root
      
          Canvas {
              anchors.fill: parent
      
              onPaint: {
                  var ctx = getContext("2d")
                  ctx.shadowBlur = 10;
                  ctx.beginPath();
                  ctx.fillText("hello", 0, 0);
              }
          }
      }
      
      0	__GI_raise	raise.c	64	0x7ffff4f02425	
      1	__GI_abort	abort.c	91	0x7ffff4f05b8b	
      2	qt_message_fatal	qlogging.cpp	938	0x7ffff592221b	
      3	QMessageLogger::fatal	qlogging.cpp	360	0x7ffff591fe8e	
      4	qt_assert	qglobal.cpp	1992	0x7ffff591b75c	
      5	QImage::constScanLine	qimage.cpp	1555	0x7ffff617e5fe	
      6	qt_image_convolute_filter	qquickcontext2d.cpp	286	0x7ffff7a1dadc	
      7	qt_image_boxblur	qquickcontext2d.cpp	309	0x7ffff7a1dd1b	
      8	makeShadowImage	qquickcontext2dcommandbuffer.cpp	72	0x7ffff7a4b1e4	
      9	fillShadowPath	qquickcontext2dcommandbuffer.cpp	112	0x7ffff7a4b768	
      10	QQuickContext2DCommandBuffer::replay	qquickcontext2dcommandbuffer.cpp	394	0x7ffff7a4cc3c	
      11	QQuickContext2DTexture::paintWithoutTiles	qquickcontext2dtexture.cpp	235	0x7ffff7a48078	
      12	QQuickContext2DTexture::paint	qquickcontext2dtexture.cpp	255	0x7ffff7a48188	
      13	QQuickContext2DTexture::qt_static_metacall	moc_qquickcontext2dtexture_p.cpp	108	0x7ffff7a8cbf3	
      14	QMetaMethod::invoke	qmetaobject.cpp	2154	0x7ffff5b7e9f6	
      15	QMetaObject::invokeMethod	qmetaobject.cpp	1463	0x7ffff5b7def7	
      16	QMetaObject::invokeMethod	qobjectdefs.h	395	0x7ffff7a1ad93	
      17	QQuickContext2D::flush	qquickcontext2d.cpp	3445	0x7ffff7a39f99	
      18	QQuickCanvasItem::updatePaintNode	qquickcanvasitem.cpp	701	0x7ffff7a18e3e	
      19	QQuickWindowPrivate::updateDirtyNode	qquickwindow.cpp	2371	0x7ffff79141d1	
      20	QQuickWindowPrivate::updateDirtyNodes	qquickwindow.cpp	2192	0x7ffff7913135	
      21	QQuickWindowPrivate::syncSceneGraph	qquickwindow.cpp	323	0x7ffff790b761	
      22	QSGRenderThread::sync	qsgthreadedrenderloop.cpp	529	0x7ffff78e37f7	
      23	QSGRenderThread::syncAndRender	qsgthreadedrenderloop.cpp	563	0x7ffff78e3952	
      24	QSGRenderThread::run	qsgthreadedrenderloop.cpp	650	0x7ffff78e3d92	
      25	QThreadPrivate::start	qthread_unix.cpp	339	0x7ffff59345d1	
      26	start_thread	pthread_create.c	308	0x7ffff3c58e9a	
      27	clone	clone.S	112	0x7ffff4fbfcbd	
      28	??				
      

      The assertion is below (i is equal to height()).

      const uchar *QImage::constScanLine(int i) const
      {
          if (!d)
              return 0;
      
          Q_ASSERT(i >= 0 && i < height());
          return d->data + i * d->bytes_per_line;
      }
      

      Attachments

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

        Activity

          People

            rodal Samuel Rødal
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes