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

Crash when onPressed is triggered on MultiPointTouchArea

    XMLWordPrintable

Details

    • Linux/Wayland

    Description

      I have been encountering a crash with Qt 5.15.17 on Arch Linux that is occuring when a MultiPointTouchArea gets removed from the object tree (e.g. by setting parent to null) inside its own onPressed event handler that is triggered by a touch event. The resulting crash dump is as follows:

      1  ??                                                                                                     0x7ffff7cd1fb4
      2  ??                                                                                                     0x7ffff7cd3363
      3  QQuickItem::event(QEvent *)                                                                            0x7ffff7c405f0
      4  QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                 0x7ffff688cf98
      5  QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *, QQuickPointerEvent *, bool)             0x7ffff7c55bf2
      6  QQuickWindowPrivate::deliverUpdatedTouchPoints(QQuickPointerTouchEvent *)                              0x7ffff7c56371
      7  QQuickWindowPrivate::deliverTouchEvent(QQuickPointerTouchEvent *)                                      0x7ffff7c57a6e
      8  QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent *)                                         0x7ffff7c4f77b
      9  QQuickWindowPrivate::deliverDelayedTouchEvent()                                                        0x7ffff7c51864
      10 QQuickWindowPrivate::flushFrameSynchronousEvents()                                                     0x7ffff7c521b1
      11 ??                                                                                                     0x7ffff7c021a3
      12 QQuickWindow::event(QEvent *)                                                                          0x7ffff7c52519
      13 QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                 0x7ffff688cf98
      14 QPlatformWindow::deliverUpdateRequest()                                                                0x7ffff6d334d0
      15 QObject::event(QEvent *)                                                                               0x7ffff68b0be0
      16 QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                 0x7ffff688cf98
      17 QCoreApplicationPrivate::sendPostedEvents(QObject *, int, QThreadData *)                               0x7ffff688daa3
      18 ??                                                                                                     0x7ffff68d3e68
      19 g_main_context_dispatch                                                                                0x7ffff551687b
      20 ??                                                                                                     0x7ffff556d299
      21 g_main_context_iteration                                                                               0x7ffff5515132
      22 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                             0x7ffff68d7c4c
      23 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                                                0x7ffff688573c
      24 QCoreApplication::exec()                                                                               0x7ffff6890269
      25 main                                                                                       main.cpp 21 0x5555555565a1
      
      

      This is the basic QML example used to reproduce the issue.

      import QtQuick 2.4
      import QtQuick.Controls 2.4
      
      ApplicationWindow {
          visible: true
          width: 600
          height: 500
          title: "ExampleApp"
      
          Rectangle {
              anchors.fill: parent
              MultiPointTouchArea {
                  anchors.fill: parent
                  onPressed: {
                      parent = null
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            muhzi Muhammad Ziad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes