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

Crash In Some cases when custom event send to widget

    XMLWordPrintable

Details

    Description

      When a custom event is send to simulate click event on QWidget in a test case as follows:
      SendX11Event(ButtonPress, ButtonPressMask, QPoint(0, 0));
      SendX11Event(ButtonRelease, ButtonReleaseMask, QPoint(0, 0));

      Windows under test receives the event and process it normally, then it has been deleted and move on to next test that uses QWidget and there it crashes.

      It Appears that perhaps deleted window pointer is dangling. Following patch fixes this problem.

      
      diff -r 0bf55f62cd8b -r 33a1a8194f8e
      src/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp
      --- a/src/plugins/platforms/xcb/qxcbwindow.cpp Thu Feb 02 15:35:54 2017 +0100
      +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp Mon Feb 13 14:24:50 2017 -0600
      @@ -636,6 +636,8 @@
      doFocusOut();
      if (connection()->mouseGrabber() == this)
      connection()->setMouseGrabber(Q_NULLPTR);
      + if (connection()->mousePressWindow() == this)
      + connection()->setMousePressWindow(Q_NULLPTR);
      
      if (m_syncCounter && m_usingSyncProtocol)
      Q_XCB_CALL(xcb_sync_destroy_counter(xcb_connection(),
      m_syncCounter));
      
      

      This seems like regression in Qt5.6.2. Qt5.6.0 works good.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            irfan.omair@digia.com Irfan Omair
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes