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

Qt will crash if changing screen resolution on Mac

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      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

        For Gerrit Dashboard: QTBUG-91919
        # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: