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

Crash triggered by QQuickWindowPrivate::deliverPressOrReleaseEvent

XMLWordPrintable

    • Linux/Wayland
    • 042f2b67739439c020451843d887d131d5f9cbdc

      We faced a problem that leads to application crash while performing some touch operations on touchscreen (e.g. sliding screen left to right).

      The problem is caused by unsafe memory access in QQuickWindowPrivate while it is handling touchEvent.

      I made some analysis according to stack trace and found following lines (https://github.com/qt/qtdeclarative/blob/5.12.1/src/quick/items/qquickwindow.cpp line 2530): 

      if (isTouchEvent && event->isPressEvent() && isDeliveringTouchAsMouse() && pointerEventInstance(touchMouseDevice)->pointById(touchMouseId)->grabberPointerHandler()) {
      

       It seems like after calling pointById(touchMouseId) we are receiving nullptr and after that app crashed in call of grabberPointerHandler() with this=nullptr instance object.

      It's hard for us to add simple example for it (seems like that nullptr access problem is very rare) but I pointed the place with unsafe memory access.

      I also attached gdb stack trace output.

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

            srutledg Shawn Rutledge
            nkrasnoyarov NIKITA KRASNOYAROV
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes