[Development] Qt 5.9.0 RC aborts on OS X 10.9

René J.V. Bertin rjvbertin at gmail.com
Fri Apr 7 21:40:02 CEST 2017


Hello,

A somewhat unorthodox issue report. I encountered the error messages below after building the 5.9.0RC QMacStyle against Qt 5.8.0 (hence also reporting via the ML):

2017-04-07 21:26:41.315 oxygen-demo5[3673:d0b] +[NSGraphicsContext graphicsContextWithCGContext:flipped:]: unrecognized selector sent to class 0x7fff794b78f8
2017-04-07 21:26:41.317 oxygen-demo5[3673:d0b] +[NSGraphicsContext graphicsContextWithCGContext:flipped:]: unrecognized selector sent to class 0x7fff794b78f8
2017-04-07 21:26:41.323 oxygen-demo5[3673:d0b] (
        0   CoreFoundation                      0x00007fff8a11e25c __exceptionPreprocess + 172
        1   libobjc.A.dylib                     0x00007fff8af92e75 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff8a12102d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
        3   CoreFoundation                      0x00007fff8a07c272 ___forwarding___ + 1010
        4   CoreFoundation                      0x00007fff8a07bdf8 _CF_forwarding_prep_0 + 120
        5   libqaltmacstyle.dylib               0x000000010bb6d3ae _ZNK16QMacStylePrivate13drawFocusRingEP8QPainterRK5QRectiid + 1182
        6   libqaltmacstyle.dylib               0x000000010bb7acb1 _ZNK9QMacStyle11drawControlEN6QStyle14ControlElementEPK12QStyleOptionP8QPainterPK7QWidget + 5281
        7   libqaltmacstyle.dylib               0x000000010bb75c93 _ZNK9QMacStyle9styleHintEN6QStyle9StyleHintEPK12QStyleOptionPK7QWidgetP16QStyleHintReturn + 739
        8   QtWidgets                           0x0000000103be3674 _ZN18QFocusFramePrivate10updateSizeEv + 356
        9   QtWidgets                           0x0000000103be3489 _ZN18QFocusFramePrivate6updateEv + 41
        10  libqaltmacstyle.dylib               0x000000010bb876c7 _ZN9QMacStyle5eventEP6QEvent + 567

This is when building on OS X 10.9.5 using the 10.9 SDK (which always worked better than using the 10.10 SDK). I'm not exactly certain when the graphicsContextWithCGContext:flipped selector was introduced; apparently in 10.10 but apparently in a later 10.10 version than represented by the 10.10 SDK on OS X 10.9 . 
IOW, I needed to protect the new selector with `#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)` and use the old version otherwise.

HtH,
René



More information about the Development mailing list