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

Programs built with Qt 5.9.2 fail to run on MacOS versions < 10.10

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.9.2
    • Core: Other
    • None
    • macOS

    Description

      5.9.2 has the function QOperatingSystemVersion::current which makes a call to the MacOS API [NSProcessInfo operatingSystemVersion].  This function is not supported prior to MacOS v. 10.10 (see [SDK Info Here|https://developer.apple.com/documentation/foundation/nsprocessinfo/1410906-operatingsystemversion?language=objc).]  Since this function is called during the dylib load phase, it is not possible to avoid calling it upon startup, producing the following crash when run on a 10.7 machine:

      /Users/qa/Downloads/test.app/Contents/MacOS/../Frameworks/QtCore.framework/Versions/5/QtCore
      *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSProcessInfo operatingSystemVersion]: unrecognized selector sent to instance 0x7f9b91419c40'
      *** First throw call stack:
      (
       0 CoreFoundation 0x00007fff903ecf56 __exceptionPreprocess + 198
       1 libobjc.A.dylib 0x00007fff901b7d5e objc_exception_throw + 43
       2 CoreFoundation 0x00007fff904791be -[NSObject doesNotRecognizeSelector:] + 190
       3 CoreFoundation 0x00007fff903d9e23 ___forwarding___ + 371
       4 CoreFoundation 0x00007fff90423e0d __forwarding_prep_1___ + 237
       5 QtCore 0x0000000111263e34 _ZN23QOperatingSystemVersion7currentEv + 52
       6 QtCore 0x000000011125a899 _ZN9QInternal17activateCallbacksENS_8CallbackEPPv + 2617
       7 ??? 0x00007fff6fb6dda6 0x0 + 140735067643302
       8 ??? 0x00007fff6fb6daf2 0x0 + 140735067642610
       9 ??? 0x00007fff6fb6b2e4 0x0 + 140735067632356
       10 ??? 0x00007fff6fb6b27d 0x0 + 140735067632253
       11 ??? 0x00007fff6fb6b27d 0x0 + 140735067632253
       12 ??? 0x00007fff6fb6b27d 0x0 + 140735067632253
       13 ??? 0x00007fff6fb6c0b7 0x0 + 140735067635895
       14 ??? 0x00007fff6fb614dd 0x0 + 140735067591901
       15 ??? 0x00007fff6fb6560b 0x0 + 140735067608587
       16 ??? 0x00007fff6fb5f059 0x0 + 140735067582553
      )
       
      objc[10559]: garbage collection is OFF
      abort() called
      terminate called throwing an exception
      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0 libsystem_kernel.dylib 0x00007fff915d4ce2 __pthread_kill + 10
      1 libsystem_c.dylib 0x00007fff9238a7d2 pthread_kill + 95
      2 libsystem_c.dylib 0x00007fff9237ba7a abort + 143
      3 libc++abi.dylib 0x00007fff942497bc abort_message + 214
      4 libc++abi.dylib 0x00007fff94246fcf default_terminate() + 28
      5 libobjc.A.dylib 0x00007fff901b81b9 _objc_terminate + 94
      6 libc++abi.dylib 0x00007fff94247001 safe_handler_caller(void (*)()) + 11
      7 libc++abi.dylib 0x00007fff9424705c std::terminate() + 16
      8 libc++abi.dylib 0x00007fff94248152 __cxa_throw + 114
      9 libobjc.A.dylib 0x00007fff901b7e7a objc_exception_throw + 327
      10 com.apple.CoreFoundation 0x00007fff904791be -[NSObject doesNotRecognizeSelector:] + 190
      11 com.apple.CoreFoundation 0x00007fff903d9e23 ___forwarding___ + 371
      12 com.apple.CoreFoundation 0x00007fff90423e0d __forwarding_prep_1___ + 237
      13 com.test.test 0x0000000111263e34 QOperatingSystemVersion::current() + 52
      14 com.test.test 0x000000011125a899 0x111246000 + 84121
      15 dyld 0x00007fff6fb6dda6 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 218
      16 dyld 0x00007fff6fb6daf2 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46
      17 dyld 0x00007fff6fb6b2e4 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 260
      18 dyld 0x00007fff6fb6b27d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 157
      19 dyld 0x00007fff6fb6b27d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 157
      20 dyld 0x00007fff6fb6b27d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 157
      21 dyld 0x00007fff6fb6c0b7 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 59
      22 dyld 0x00007fff6fb614dd dyld::initializeMainExecutable() + 206
      23 dyld 0x00007fff6fb6560b dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**) + 1852
      24 dyld 0x00007fff6fb5f059 _dyld_start + 49
      

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            sbroberg sbroberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes