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

QSystemTrayIcon crash on exit on Mac with dual displays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12
    • 5.4.1
    • QPA
    • None
    • Mac OS X 10.9
    • macOS

    Description

      My application uses QSystemTrayIcon. On process exit, a crash occurs at qtbase/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm:431 (in QNSImageView::drawRect()).

      It feels like there is a double-delete problem; accessing [parent item] is the issue. But it parent was null, then this would not crash.

      When I remove code that deletes some objects in the object hierarchy, the problem goes away. Everything's allocated on the heap, so it appears that something about object ownership is being violated.

      It is not easy to reproduce; I can only get it to consistently happen with a Macbook Pro hooked up to an external display (actually a projector) via HDMI, and only when I boot up the system with the external display attached. If I remove/attach the display cable after startup, the incidence of the crash goes down dramatically.

      I cannot reproduce reliably on a Mac mini attached to 2 LCD displays (via HDMI->DVI and DisplayPort->VGA).

      Crash report attached.

      I'm willing to believe that I'm doing something wrong rather than Qt, but I'm having trouble finding anything! As far as I can tell, I'm following object ownership rules.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            ndeboni Neil DeBoni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes