Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Mysterious crash on Mac

Mysterious crash on Mac

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marksibly
    wrote on last edited by
    #1

    Hi,

    I have an app written in Qt 4.8.4 that is crashing mysteriously on the Mac, apparently when the Mac wakes up. I can't reproduce the problem myself, but several users have reported the same problem, although it seems to happen infrequently.

    The relevant bit of the crash log appears below.

    It appears to be due to a 'QNSListener' not having a 'notificationHandler' selector, but I can find no docs anywhere on QNSListener.

    Anyone else heard of this problem? Is there any solution?

    [code]
    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000

    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSListener notificationHandler:]: unrecognized selector sent to instance 0x600000041560'
    terminating with uncaught exception of type NSException
    abort() called

    Application Specific Backtrace 1:
    0 CoreFoundation 0x00007fff9680464c __exceptionPreprocess + 172
    1 libobjc.A.dylib 0x00007fff8ff126de objc_exception_throw + 43
    2 CoreFoundation 0x00007fff968076bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3 CoreFoundation 0x00007fff9674ea84 forwarding + 1028
    4 CoreFoundation 0x00007fff9674e5f8 _CF_forwarding_prep_0 + 120
    5 CoreFoundation 0x00007fff967c0cbc CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12
    6 CoreFoundation 0x00007fff966b21b4 _CFXNotificationPost + 3140
    7 libdispatch.dylib 0x00007fff8818c323 _dispatch_call_block_and_release + 12
    8 libdispatch.dylib 0x00007fff88187c13 _dispatch_client_callout + 8
    9 libdispatch.dylib 0x00007fff8818a88f _dispatch_root_queue_drain + 935
    10 libdispatch.dylib 0x00007fff88198fe4 _dispatch_worker_thread3 + 91
    11 libsystem_pthread.dylib 0x00007fff8ea286cb _pthread_wqthread + 729
    12 libsystem_pthread.dylib 0x00007fff8ea264a1 start_wqthread + 13
    [/quote]

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QNSListener is an internal class used only the CoreWlan related code. On what version of OS X are they experiencing this ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sandy.martel23
        wrote on last edited by
        #3

        @marksibly said:

        It appears to be due to a 'QNSListener' not having a 'notificationHandler' selector

        Do you package the plugin bearer/libqcorewlanbearer.dylib ?

        This is where -[QNSListener notificationHandler:] is defined.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          marksibly
          wrote on last edited by
          #4

          On what version of OS X are they experiencing this ?

          Seems to be a Yosemite problem.

          Do you package the plugin bearer/libqcorewlanbearer.dylib ?

          No I don't, I just use macdeployqt which doesn't appear to copy it in.

          I can't actually find the file libqcorewlanbearer.dylib anywhere on my Mac either, but spotlight appears to be doing something weird so it may actually be there somewhere.

          My Qt install is also a bit of a mess - I've had to do all sorts of weird crap over time so Qt can find compilers etc. I guess there's no easy way to uninstall/reinstall everything Qt related.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            marksibly
            wrote on last edited by
            #5

            Ok, I eventually found libqcorewlanbearer.dylib in /Developer/Applications/Qt/plugins/bearer/. There's also libqgenericbearer.dylib there.

            Does this sound like the correct location for a 4.8.4 lib?

            Should I just copy it into to app package Frameworks dir along with other dylibs?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              marksibly
              wrote on last edited by
              #6

              Ok, the bearers/ stuff WAS being deployed - I just hadn't checked the PlugIns dir.

              However, my app is not doing this:

              qApp->setLibraryPath(qApp->applicationDirPath() + "/../PlugIns");

              With a bit of luck, that could be the problem!

              1 Reply Last reply
              0
              • M Offline
                M Offline
                marksibly
                wrote on last edited by
                #7

                Well, after trying this trick...

                $ export DYLD_PRINT_LIBRARIES=1
                $ ./Ted.app/Contents/MacOS/Ted

                ...it looks like libqcorewlanbearer.dylib and all other plugins are being correctly loaded from the app's PlugIns dir after all.

                Any other ideas?

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved