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

Spurious crash on plug-in scan (macOS / static notification listener)

    XMLWordPrintable

Details

    • macOS

    Description

      We received a crash report, hinting at another issue with statically allocated listeners into the Cocoa application, which are not cleanly torn down before the application exists:

       

      malloc_error_break 0x00007fff70a71355
      malloc_vreport 0x00007fff70a6749f
      malloc_zone_error 0x00007fff70a78d27
      tiny_free_list_remove_ptr 0x00007fff70a5f081
      tiny_free_no_lock 0x00007fff70a5e279
      free_tiny 0x00007fff70a5dd8b
      -[_CFXNotificationTokenRegistration removeFromParent:] 0x00007fff36bdd6a2
      -[_CFXNotificationRegistrar remove:] 0x00007fff36bdd5a1
      -[_CFXNotificationRegistrar match:object:observer:enumerator:] 0x00007fff36bdcccd
      _CFXNotificationRemoveObservers 0x00007fff36bdc502
      -[NSNotificationCenter removeObserver:name:object:] 0x00007fff3924d1bb
      NI_5_15_7::QMacNotificationObserver::remove() qcore_mac_p.h:346
      NI_5_15_7::QMacNotificationObserver::~QMacNotificationObserver() qcore_mac_p.h:349
      NI_5_15_7::QMacNotificationObserver::~QMacNotificationObserver() qcore_mac_p.h:349
      __cxa_finalize_ranges 0x00007fff7094c13c
      exit 0x00007fff7094c412
      -[NSApplication terminate:] 0x00007fff3411b994
      invocation function for block in Steinberg::Vst::EditorHost::Platform::quit() platform.mm:109
      _dispatch_client_callout 0x00007fff70849658
      _dispatch_continuation_pop 0x00007fff7084b818
      _dispatch_source_invoke 0x00007fff7085b4be
      _dispatch_main_queue_callback_4CF 0x00007fff70854b6d
      __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 0x00007fff36c1a7b1
      __CFRunLoopRun 0x00007fff36bda5b7
      CFRunLoopRunSpecific 0x00007fff36bd976e
      RunCurrentEventLoopInMode 0x00007fff35805aad
      ReceiveNextEventCommon 0x00007fff358057c5
      _BlockUntilNextEventMatchingListInModeWithFilter 0x00007fff35805569
      _DPSNextEvent 0x00007fff33e4e659
      -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 0x00007fff33e4cea0
      -[NSApplication run] 0x00007fff33e3ebae
      NSApplicationMain 0x00007fff33e10996
      main platform.mm:233
      start 0x00007fff708a2cc9
      start 0x00007fff708a2cc9

       

      The current suspicion goes towards the style listener attached here:

      https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/styles/mac/qmacstyle_mac.mm?h=6.3.0#n2095

       

      I will attach a patch which should solve this issue (be it in a not ideal way - i.e. this listener again should ideally be coupled to the native cocoa implementation).

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            stefan.wastl Stefan Wastl
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes