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

Checking isActive() on focusOutEvent causes segmentation fault

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.0.0 Beta 1
    • 5.0.0
    • GUI: Window management
    • None
    • ArchLinux, running KDE 4.8.1, qtbase 8cec8a4f68a5af76f9f1ee11e1f4b10603a1916c
    • 8b5218a1e9136d6889d3e57b37b5341b4bcf6df0

    Description

      The attached test case shows the crash, which happens inside QWindow::isAncestorOf when it is called by QWindow::isActive, due to the focus pointer that is null when the whole application loses the focus. The focus pointer is null in this case because of the return of QGuiApplication::focusWindow().

      I have a patch that solves this issue. It is a simple patch, however I am wondering if it should go inside of isActive() or isAncestorOf(). The first alternative seems to be the right one.

      I'll submit the change to gerrit and link this Task, so we can discuss about the solution.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            anselmolsm Anselmo L. S. Melo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes