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

QCocoaApplication_mac crashes while QT running as a plug-in

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 4.8.2
    • Core: Event loop
    • None
    • OS X 10.7
    • macOS

    Description

      QT crashes in the function below:

      • (BOOL)qt_filterEvent:(NSEvent *)event
        {
        // crash if qApp is NULL
        if (qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
        return true;

      Because 'qApp' can be deleted while running QT as a plug-in, above lines should check 'qApp' before using it.

      The function is invoked by 'qt_sendEvent_replacment' which is a reimplemented method of 'sendEvent' of NSApplication. It is always existing even Qt instance has been killed.

      It is necessary to recover original methods when the Qt instance is destructed.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            peter@avenza.com Peter Zhang
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes