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

Various crashes on macOS Sierra (v10.12) with QMacNativeWidget in App Extensions

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      91cf255c5ad4eea8ad2022d8d9904f8b6419024a

      Description

      The project creates 2 targets an .app and an .appex (extension to Photos)

      Crashes seem to happen at many different spots in the .appex version... code works well when the project runs as an .app on 10.12, the same code has been working well for over a year (both .app and .appex on a macOS 10.11 environment ... )

      The issue is with macOS Sierra and seems deep within Qt... There are some NULL pointers sent back which create bad selector sent back to instance

      see 3 different crash logs...

      System Integrity Protection: enabled
      
      Crashed Thread:        0  Dispatch queue: com.apple.main-thread
      
      Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
      Exception Codes:       0x0000000000000001, 0x0000000000000000
      Exception Note:        EXC_CORPSE_NOTIFY
      
      Termination Signal:    Illegal instruction: 4
      Termination Reason:    Namespace SIGNAL, Code 0x4
      Terminating Process:   exc handler [0]
      
      Application Specific Information:
      Crashing on exception: <NSRemoteView: 0x618000739be0> invalid
      
      Application Specific Backtrace 1:
      0   CoreFoundation                      0x00007fffc27ba48b __exceptionPreprocess + 171
      1   libobjc.A.dylib                     0x00007fffd6f1bcad objc_exception_throw + 48
      2   CoreFoundation                      0x00007fffc27bf192 +[NSException raise:format:arguments:] + 98
      3   Foundation                          0x00007fffc41f1390 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
      4   ViewBridge                          0x00007fffd59b1445 -[NSRemoteView serviceMarshalConnection] + 190
      5   ViewBridge                          0x00007fffd59b463c -[NSRemoteView _viewServiceMarshalProxy:withDetailedErrorHandler:] + 370
      6   ViewBridge                          0x00007fffd59b49b0 -[NSRemoteView _viewServiceMarshalProxy:withErrorHandler:] + 76
      7   ViewBridge                          0x00007fffd59c022c __47-[NSRemoteView synchronizeAnimationsInActions:]_block_invoke + 622
      8   ViewBridge                          0x00007fffd599bd14 __78+[NSVB_Window _synchronizeDrawingAcrossProcessesOverPort:andPreCommitHandler:]_block_invoke_2 + 186
      9   ViewBridge                          0x00007fffd59df83f withAutoreleasePoolAndExceptionProcessing + 216
      10  ViewBridge                          0x00007fffd599bc54 __78+[NSVB_Window _synchronizeDrawingAcrossProcessesOverPort:andPreCommitHandler:]_block_invoke + 78
      11  QuartzCore                          0x00007fffc8248eea _ZNK2CA11Transaction5Fence13run_callbacksEv + 40
      12  QuartzCore                          0x00007fffc8350f76 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 518
      13  QuartzCore                          0x00007fffc8247d55 _ZN2CA11Transaction6commitEv + 475
      14  QuartzCore                          0x00007fffc82486b6 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 108
      15  CoreFoundation                      0x00007fffc274fec7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
      16  CoreFoundation                      0x00007fffc274fe37 __CFRunLoopDoObservers + 391
      17  CoreFoundation                      0x00007fffc2730536 CFRunLoopRunSpecific + 454
      18  HIToolbox                           0x00007fffc1ccdfbc RunCurrentEventLoopInMode + 240
      19  HIToolbox                           0x00007fffc1ccdcf9 ReceiveNextEventCommon + 184
      20  HIToolbox                           0x00007fffc1ccdc26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
      21  AppKit                              0x00007fffc03b7cf9 _DPSNextEvent + 1093
      22  AppKit                              0x00007fffc0acd243 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
      23  ViewBridge                          0x00007fffd59728ba -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 102
      24  AppKit                              0x00007fffc03ac6bd -[NSApplication run] + 926
      25  AppKit                              0x00007fffc037732d NSApplicationMain + 1237
      26  libxpc.dylib                        0x00007fffd7a5e8b3 _xpc_objc_main + 775
      27  libxpc.dylib                        0x00007fffd7a5d2d0 xpc_main + 494
      28  Foundation                          0x00007fffc418a7bb +[NSXPCListener serviceListener] + 0
      29  PlugInKit                           0x00007fffd2d06433 -[PKService run] + 865
      30  PlugInKit                           0x00007fffd2d05fa0 +[PKService main] + 55
      31  PlugInKit                           0x00007fffd2d06457 +[PKService _defaultRun:arguments:] + 17
      32  Foundation                          0x00007fffc432c95c NSExtensionMain + 51
      33  libdyld.dylib                       0x00007fffd77fa255 start + 1
      34  ???                                 0x0000000000000001 0x0 + 1
      

      another example of crash.. different spot.. seems to happen after closing a qt dialog

      Application Specific Backtrace 1:
      0   CoreFoundation                      0x00007fffc27ba48b __exceptionPreprocess + 171
      1   libobjc.A.dylib                     0x00007fffd6f1bcad objc_exception_throw + 48
      2   CoreFoundation                      0x00007fffc283bc94 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
      3   CoreFoundation                      0x00007fffc272cb55 ___forwarding___ + 1061
      4   CoreFoundation                      0x00007fffc272c6a8 _CF_forwarding_prep_0 + 120
      5   ViewBridge                          0x00007fffd596f9e3 -[NSServiceViewController setView:] + 108
      6   ViewBridge                          0x00007fffd59817af -[NSViewServiceMarshal observeValueForContentView:] + 276
      7   Foundation                          0x00007fffc414ddbd NSKeyValueNotifyObserver + 350
      8   Foundation                          0x00007fffc414d654 NSKeyValueDidChange + 486
      9   Foundation                          0x00007fffc428c2d7 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 944
      10  Foundation                          0x00007fffc41113c9 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 60
      11  Foundation                          0x00007fffc4179c3b _NSSetObjectValueAndNotify + 261
      12  libqcocoa.dylib                     0x0000000116b642d8 _ZN12QCocoaWindowD2Ev + 312
      13  libqcocoa.dylib                     0x0000000116b6487e _ZN12QCocoaWindowD0Ev + 14
      14  QtGui                               0x00000001128a4bbd _ZN7QWindow7destroyEv + 541
      15  QtWidgets                           0x0000000112fbc444 _ZN14QWidgetPrivate16deleteTLSysExtraEv + 212
      16  QtWidgets                           0x0000000112fbc112 _ZN7QWidget7destroyEbb + 834
      17  QtWidgets                           0x0000000112fbb951 _ZN7QWidgetD2Ev + 1073
      18  QtWidgets                           0x0000000112fb3e9f _ZN9QTipLabelD0Ev + 79
      19  QtCore                              0x000000011243ec87 _ZN7QObject5eventEP6QEvent + 823
      20  QtWidgets                           0x0000000112fcc69b _ZN7QWidget5eventEP6QEvent + 4203
      21  QtWidgets                           0x00000001130c5edd _ZN6QFrame5eventEP6QEvent + 45
      22  QtWidgets                           0x00000001130cbe82 _ZN6QLabel5eventEP6QEvent + 258
      23  QtWidgets                           0x0000000112f8bedd _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 269
      24  QtWidgets                           0x0000000112f8e822 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5906
      25  QtCore                              0x0000000112414aa4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 164
      26  QtCore                              0x00000001124156d8 _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData + 600
      27  libqcocoa.dylib                     0x0000000116b79d6e _ZN28QCocoaEventDispatcherPrivate19processPostedEventsEv + 190
      28  libqcocoa.dylib                     0x0000000116b7a631 _ZN28QCocoaEventDispatcherPrivate26postedEventsSourceCallbackEPv + 33
      29  CoreFoundation                      0x00007fffc27504b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      30  CoreFoundation                      0x00007fffc273161d __CFRunLoopDoSources0 + 557
      31  CoreFoundation                      0x00007fffc2730b16 __CFRunLoopRun + 934
      32  CoreFoundation                      0x00007fffc2730514 CFRunLoopRunSpecific + 420
      33  HIToolbox                           0x00007fffc1ccdfbc RunCurrentEventLoopInMode + 240
      34  HIToolbox                           0x00007fffc1ccddf1 ReceiveNextEventCommon + 432
      35  HIToolbox                           0x00007fffc1ccdc26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
      36  AppKit                              0x00007fffc03b7cf9 _DPSNextEvent + 1093
      37  AppKit                              0x00007fffc0acd243 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
      38  ViewBridge                          0x00007fffd59728ba -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 102
      39  AppKit                              0x00007fffc03ac6bd -[NSApplication run] + 926
      40  AppKit                              0x00007fffc037732d NSApplicationMain + 1237
      41  libxpc.dylib                        0x00007fffd7a5e8b3 _xpc_objc_main + 775
      42  libxpc.dylib                        0x00007fffd7a5d2d0 xpc_main + 494
      43  Foundation                          0x00007fffc418a7bb +[NSXPCListener serviceListener] + 0
      44  PlugInKit                           0x00007fffd2d06433 -[PKService run] + 865
      45  PlugInKit                           0x00007fffd2d05fa0 +[PKService main] + 55
      46  PlugInKit                           0x00007fffd2d06457 +[PKService _defaultRun:arguments:] + 17
      47  Foundation                          0x00007fffc432c95c NSExtensionMain + 51
      48  libdyld.dylib                       0x00007fffd77fa255 start + 1
      49  ???                                 0x0000000000000001 0x0 + 1
      
      

      this one happens systematically after right clicking.. a popup menu is called and shows properly after closing the popup...

      Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
      Exception Codes:       0x0000000000000001, 0x0000000000000000
      Exception Note:        EXC_CORPSE_NOTIFY
      
      Termination Signal:    Illegal instruction: 4
      Termination Reason:    Namespace SIGNAL, Code 0x4
      Terminating Process:   exc handler [0]
      
      Application Specific Information:
      Crashing on exception: -[NSNull window]: unrecognized selector sent to instance 0x7fffdd00ef70
      
      Application Specific Backtrace 1:
      0   CoreFoundation                      0x00007fffc27ba48b __exceptionPreprocess + 171
      1   libobjc.A.dylib                     0x00007fffd6f1bcad objc_exception_throw + 48
      2   CoreFoundation                      0x00007fffc283bc94 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
      3   CoreFoundation                      0x00007fffc272cb55 ___forwarding___ + 1061
      4   CoreFoundation                      0x00007fffc272c6a8 _CF_forwarding_prep_0 + 120
      5   ViewBridge                          0x00007fffd596f9e3 -[NSServiceViewController setView:] + 108
      6   ViewBridge                          0x00007fffd59817af -[NSViewServiceMarshal observeValueForContentView:] + 276
      7   Foundation                          0x00007fffc414ddbd NSKeyValueNotifyObserver + 350
      8   Foundation                          0x00007fffc414d654 NSKeyValueDidChange + 486
      9   Foundation                          0x00007fffc428c2d7 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 944
      10  Foundation                          0x00007fffc41113c9 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 60
      11  Foundation                          0x00007fffc4179c3b _NSSetObjectValueAndNotify + 261
      12  libqcocoa.dylib                     0x00000001111842d8 _ZN12QCocoaWindowD2Ev + 312
      13  libqcocoa.dylib                     0x000000011118487e _ZN12QCocoaWindowD0Ev + 14
      14  QtGui                               0x000000010cebdbbd _ZN7QWindow7destroyEv + 541
      15  QtWidgets                           0x000000010d5da444 _ZN14QWidgetPrivate16deleteTLSysExtraEv + 212
      16  QtWidgets                           0x000000010d5da112 _ZN7QWidget7destroyEbb + 834
      17  QtWidgets                           0x000000010d5d9951 _ZN7QWidgetD2Ev + 1073
      18  ResurfacePhotos                     0x000000010abbc149 _ZN15ImageAreaWidget15rightButtonMenuE6QPoint + 18281
      19  ResurfacePhotos                     0x000000010abb6ad8 _ZN15ImageAreaWidget17inputReleaseEventEiii6QPoint + 72
      20  QtWidgets                           0x000000010d5e9cc1 _ZN7QWidget5eventEP6QEvent + 1681
      21  QtWidgets                           0x000000010d5a9edd _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 269
      22  QtWidgets                           0x000000010d5ad5f0 _ZN12QApplication6notifyEP7QObjectP6QEvent + 9440
      23  QtCore                              0x000000010ca2baa4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 164
      24  QtWidgets                           0x000000010d5aa847 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb + 871
      25  QtWidgets                           0x000000010d60a52b _ZN13QWidgetWindow16handleMouseEventEP11QMouseEvent + 1387
      26  QtWidgets                           0x000000010d6095bf _ZN13QWidgetWindow5eventEP6QEvent + 175
      27  QtWidgets                           0x000000010d5a9edd _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 269
      28  QtWidgets                           0x000000010d5ac822 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5906
      29  QtCore                              0x000000010ca2baa4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 164
      30  QtGui                               0x000000010ceb488a _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 2794
      31  QtGui                               0x000000010ce9e06b _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 155
      32  libqcocoa.dylib                     0x000000011119a631 _ZN28QCocoaEventDispatcherPrivate26postedEventsSourceCallbackEPv + 33
      33  CoreFoundation                      0x00007fffc27504b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      34  CoreFoundation                      0x00007fffc273161d __CFRunLoopDoSources0 + 557
      35  CoreFoundation                      0x00007fffc2730b16 __CFRunLoopRun + 934
      36  CoreFoundation                      0x00007fffc2730514 CFRunLoopRunSpecific + 420
      37  HIToolbox                           0x00007fffc1ccdfbc RunCurrentEventLoopInMode + 240
      38  HIToolbox                           0x00007fffc1ccdcf9 ReceiveNextEventCommon + 184
      39  HIToolbox                           0x00007fffc1ccdc26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
      40  AppKit                              0x00007fffc03b7cf9 _DPSNextEvent + 1093
      41  AppKit                              0x00007fffc0acd243 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
      42  ViewBridge                          0x00007fffd59728ba -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 102
      43  AppKit                              0x00007fffc03ac6bd -[NSApplication run] + 926
      44  AppKit                              0x00007fffc037732d NSApplicationMain + 1237
      45  libxpc.dylib                        0x00007fffd7a5e8b3 _xpc_objc_main + 775
      46  libxpc.dylib                        0x00007fffd7a5d2d0 xpc_main + 494
      47  Foundation                          0x00007fffc418a7bb +[NSXPCListener serviceListener] + 0
      48  PlugInKit                           0x00007fffd2d06433 -[PKService run] + 865
      49  PlugInKit                           0x00007fffd2d05fa0 +[PKService main] + 55
      50  PlugInKit                           0x00007fffd2d06457 +[PKService _defaultRun:arguments:] + 17
      51  Foundation                          0x00007fffc432c95c NSExtensionMain + 51
      52  libdyld.dylib                       0x00007fffd77fa255 start + 1
      53  ???                                 0x0000000000000001 0x0 + 1
      
      

        Attachments

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

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            eric_vi eric villa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes