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

QQC2 ItemDelegate icon source crashes with custom image provider

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.10.0 Beta 3
    • 5.10.0 Beta 1
    • Quick: Controls 2
    • None
    • 4d452d5dff2d12a9a44277798f2a70902a3d1891

    Description

      I encountered a crash when using an ItemDelegate with a custom image provider:

          delegate: ItemDelegate {
              width: filePage.width
              icon {
                  source: "image://ext/" + ext
                  width: 32
                  height: 32
              }
              text: name
          }

       

      image://ext points to a QQuickAsyncImageProvider subclass. If I replace ItemDelegate with other items with the icon property (e.g. ToolButton) the crash still happens.

      Here's a stack trace taken on macOS:

      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0 org.qt-project.QtQml 0x000000010e3704c1 QQmlEngine::imageProvider(QString const&) const + 17
      1 org.qt-project.QtQuick 0x000000010de29ab2 QQuickPixmap::load(QQmlEngine*, QUrl const&, QSize const&, QFlags<QQuickPixmap::Option>, QQuickImageProviderOptions const&) + 1090
      2 org.qt-project.QtQuick 0x000000010df79d30 QQuickImageBase::load() + 864
      3 org.qt-project.QtQuickControls2 0x00000001180b8bdd QQuickIconImagePrivate::updateIcon() + 493
      4 org.qt-project.QtCore 0x000000010e8b44eb QMetaObject::activate(QObject*, int, int, void**) + 2347
      5 org.qt-project.QtQuick 0x000000010df79762 QQuickImageBase::setSourceSize(QSize const&) + 66
      6 org.qt-project.QtQuickControls2 0x00000001180b98cb QQuickIconLabelPrivate::createImage() + 411
      7 org.qt-project.QtQuickControls2 0x00000001180b9bfa QQuickIconLabelPrivate::updateOrSyncImage() + 106
      8 org.qt-project.QtQuickControls2 0x00000001180c4978 QQuickIconLabel::qt_metacall(QMetaObject::Call, int, void**) + 72
      9 org.qt-project.QtQml 0x000000010e402355 QV4::QQmlValueTypeWrapper::write(QObject*, int) const + 165
      10 org.qt-project.QtQml 0x000000010e3fd675 GenericBinding<0>::write(QV4::Value const&, bool, QFlags<QQmlPropertyData::WriteFlag>) + 901

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            flaviotordini Flavio Tordini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes