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

Using a 'QSystemTrayIcon' causes a segmentation fault on program exit in certain situations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • None
    • 5.7.0
    • None
    • I'm using Python v3.5.2-1, Qt v5.7.0-2 (with debugging symbols), and PyQt v5.7-2. All are packages installed from Arch Linux's [extra] repository.

    Description

      After converting my application's PyQt4 codebase to PyQt5, it has been crashing on exit in certain situations. This doesn't happen with the PyQt4 edition of the program, so I'm guessing it's due to a bug in (Py)Qt5.

      When I run the program via GDB, I get the following output. The backtrace is available in the first attachment.
      Thread 1 "python" received signal SIGSEGV, Segmentation fault.
      QHash<QPair<QObject*, QByteArray>, QPropertyAnimation*>::findNode (h=2072032906, akey=..., this=0x7ffff633fff0 <QPropertyAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State)::hash>)
      at ../../include/QtCore/../../src/corelib/tools/qhash.h:905

      After some assistance from the boys on the PyQt mailing list, I've narrowed it down to two situations. Both of them require a "QSystemTrayIcon". However, simply having one displayed doesn't cause the problem.

      What's required is to either: change the icon at runtime (and quit via any means); or quit via said icon's right-click menu (if implemented). Whenever I do either (or both) of these things, said backtrace is always generated.

      It's worth noting that this only happens when I'm using the 'Breeze' or 'Oxygen' styles: the problem doesn't occur if I'm instead using 'Fusion' or 'Windows'. This should make it easier for you to diagnose.

      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
            xavion Xavion
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes