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

Qt will crash if changing screen resolution on Mac

    XMLWordPrintable

Details

    • macOS
    • 96469ae338c3146f4efea3fabaaae5bc6ecd6a59 (qt/qtbase/dev) d1c2ddc8c80b86a67068f8f3bc29ac3125a0c05b (qt/qtbase/6.1) 8fd51adaf930eedb8323d314fa377d9606fa8373 (qt/tqtc-qtbase/5.15) 668768ade5c7fb119c455417965628a4e50feac6 (qt/qtbase/6.2)

    Description

      Our application is a AA_PluginApplication in a shared library. When host application loads the shared lib it will create qApp. When host application unloads the shared lib it will destroy qApp.

      In QCocoaScreen, it registers notification handlers to deal with screen parameters changed events. But the handlers are static and they are not unregistered even after qApp is destroyed. Then when user changes screen resolution, it triggers the handlers and eventually call qApp->screen* function and cause null pointer fault.

      Attached is the patch to unregister/remove the handlers when qApp is released.

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            yaya Yang Yang
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: