Qt 5.6 QtWebEngine crashes on launch in Xcode on OSX 10.11



  • Hello all,

    I've been struggling to transfer a QT project over from Windows to OSX. The project uses QtWebEngine, which unfortunately has a variety of openssl issues on OSX. From what I understand, some of those issues were supposed to be eliminated in Qt 5.6, which by-default uses native securetransport.

    To solve some of theses issues, I downloaded 5.6-beta binary and created an .xcodeproject using:
    ~/Qt5.6.0/5.6/clang_64/bin/qmake -spec macx-xcode

    I then attempted to compile and run the project in xcode. It looks like none of the ssl issues were resolved and qtwebengine also seems to have crashed:

    [0208/120046:WARNING:mac_util.mm(466)] Assuming Darwin 15 is Mac OS X 10.11
    [0208/120046:WARNING:memory_mac.mm(536)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_client_callback
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
    [0208/120046:WARNING:mac_util.mm(466)] Assuming Darwin 15 is Mac OS X 10.11
    [0208/120046:WARNING:memory_mac.mm(536)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
    [0208/120047:FATAL:layer_tree_host_impl.cc(2480)] Check failed: !CurrentlyScrollingLayer(). 
    0   QtWebEngineCore_debug               0x0000000101b5c89e _ZN4base5debug10StackTraceC2Ev + 30
    1   QtWebEngineCore_debug               0x0000000101b5c8d5 _ZN4base5debug10StackTraceC1Ev + 21
    2   QtWebEngineCore_debug               0x0000000101bb1708 _ZN7logging10LogMessageD2Ev + 72
    3   QtWebEngineCore_debug               0x0000000101baf9c5 _ZN7logging10LogMessageD1Ev + 21
    4   QtWebEngineCore_debug               0x00000001005690a3 _ZN2cc17LayerTreeHostImpl11ScrollBeginERKN3gfx5PointENS_12InputHandler15ScrollInputTypeE + 419
    5   QtWebEngineCore_debug               0x00000001031a6e02 _ZN7content17InputHandlerProxy16HandleMouseWheelERKN5blink18WebMouseWheelEventE + 658
    6   QtWebEngineCore_debug               0x00000001031a58e2 _ZN7content17InputHandlerProxy16HandleInputEventERKN5blink13WebInputEventE + 642
    7   QtWebEngineCore_debug               0x00000001031a4d74 _ZN7content17InputHandlerProxy31HandleInputEventWithLatencyInfoERKN5blink13WebInputEventEPN2ui11LatencyInfoE + 676
    8   QtWebEngineCore_debug               0x000000010319cad6 _ZN7content19InputHandlerManager16HandleInputEventEiPKN5blink13WebInputEventEPN2ui11LatencyInfoE + 710
    9   QtWebEngineCore_debug               0x00000001031a0a87 _ZN4base8internal15RunnableAdapterIMN7content19InputHandlerManagerEFNS2_18InputEventAckStateEiPKN5blink13WebInputEventEPN2ui11LatencyInfoEEE3RunEPS3_RKiRKS8_RKSB_ + 183
    10  QtWebEngineCore_debug               0x00000001031a095e _ZN4base8internal12InvokeHelperILb0EN7content18InputEventAckStateENS0_15RunnableAdapterIMNS2_19InputHandlerManagerEFS3_iPKN5blink13WebInputEventEPN2ui11LatencyInfoEEEENS0_8TypeListIJPS5_RKiRKS9_RKSC_EEEE8MakeItSoESF_SH_SJ_SL_SN_ + 110
    11  QtWebEngineCore_debug               0x00000001031a08ea _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0EEEENS0_9BindStateINS0_15RunnableAdapterIMN7content19InputHandlerManagerEFNS6_18InputEventAckStateEiPKN5blink13WebInputEventEPN2ui11LatencyInfoEEEEFS8_PS7_iSC_SF_ENS0_8TypeListIJNS0_17UnretainedWrapperIS7_EEEEEEENSL_IJNS0_12UnwrapTraitsISN_EEEEENS0_12InvokeHelperILb0ES8_SI_NSL_IJSJ_RKiRKSC_RKSF_EEEEEFS8_SV_SX_SZ_EE3RunEPNS0_13BindStateBaseESV_SX_SZ_ + 154
    12  QtWebEngineCore_debug               0x000000010319aed0 _ZNK4base8CallbackIFN7content18InputEventAckStateEiPKN5blink13WebInputEventEPN2ui11LatencyInfoEEE3RunERKiRKS6_RKS9_ + 112
    13  QtWebEngineCore_debug               0x000000010319a06c _ZN7content16InputEventFilter16ForwardToHandlerERKN3IPC7MessageE + 1660
    14  QtWebEngineCore_debug               0x000000010319bb5a _ZN4base8internal15RunnableAdapterIMN7content16InputEventFilterEFvRKN3IPC7MessageEEE3RunEPS3_S7_ + 138
    15  QtWebEngineCore_debug               0x000000010319ba91 _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIMN7content16InputEventFilterEFvRKN3IPC7MessageEEEENS0_8TypeListIJRKPS4_S8_EEEE8MakeItSoESB_SF_S8_ + 65
    16  QtWebEngineCore_debug               0x000000010319ba49 _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0ELm1EEEENS0_9BindStateINS0_15RunnableAdapterIMN7content16InputEventFilterEFvRKN3IPC7MessageEEEEFvPS7_SB_ENS0_8TypeListIJSF_S9_EEEEENSH_IJNS0_12UnwrapTraitsISF_EENSK_IS9_EEEEENS0_12InvokeHelperILb0EvSE_NSH_IJRKSF_SB_EEEEEFvvEE3RunEPNS0_13BindStateBaseE + 121
    17  QtWebEngineCore_debug               0x000000010199351e _ZNK4base8CallbackIFvvEE3RunEv + 46
    18  QtWebEngineCore_debug               0x0000000101b5dc2a _ZN4base5debug13TaskAnnotator7RunTaskEPKcS3_RKNS_11PendingTaskE + 890
    19  QtWebEngineCore_debug               0x0000000101bdd341 _ZN4base11MessageLoop7RunTaskERKNS_11PendingTaskE + 417
    20  QtWebEngineCore_debug               0x0000000101bdd48c _ZN4base11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE + 76
    21  QtWebEngineCore_debug               0x0000000101bddab2 _ZN4base11MessageLoop6DoWorkEv + 530
    22  QtWebEngineCore_debug               0x0000000101b2656d _ZN4base24MessagePumpCFRunLoopBase7RunWorkEv + 93
    23  QtWebEngineCore_debug               0x0000000101b264fc ___ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv_block_invoke + 28
    24  QtWebEngineCore_debug               0x0000000101bb432a CS2_begin + 0
    25  QtWebEngineCore_debug               0x0000000101b25b97 _ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv + 87
    26  CoreFoundation                      0x00007fff8eca05c1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    27  CoreFoundation                      0x00007fff8ec9241c __CFRunLoopDoSources0 + 556
    28  CoreFoundation                      0x00007fff8ec9193f __CFRunLoopRun + 927
    29  CoreFoundation                      0x00007fff8ec91338 CFRunLoopRunSpecific + 296
    30  QtWebEngineCore_debug               0x0000000101b26b2e _ZN4base20MessagePumpCFRunLoop5DoRunEPNS_11MessagePump8DelegateE + 62
    31  QtWebEngineCore_debug               0x0000000101b2628c _ZN4base24MessagePumpCFRunLoopBase3RunEPNS_11MessagePump8DelegateE + 124
    32  QtWebEngineCore_debug               0x0000000101bdcdf0 _ZN4base11MessageLoop10RunHandlerEv + 208
    33  QtWebEngineCore_debug               0x0000000101c376c4 _ZN4base7RunLoop3RunEv + 68
    34  QtWebEngineCore_debug               0x0000000101bdc247 _ZN4base11MessageLoop3RunEv + 247
    35  QtWebEngineCore_debug               0x0000000101cd1ed9 _ZN4base6Thread3RunEPNS_11MessageLoopE + 25
    36  QtWebEngineCore_debug               0x0000000101cd242c _ZN4base6Thread10ThreadMainEv + 1292
    37  QtWebEngineCore_debug               0x0000000101cb883c _ZN4base12_GLOBAL__N_110ThreadFuncEPv + 268
    38  libsystem_pthread.dylib             0x000000011a4999f9 _pthread_body + 131
    39  libsystem_pthread.dylib             0x000000011a499976 _pthread_body + 0
    40  libsystem_pthread.dylib             0x000000011a496fbd thread_start + 13
    
    [0208/120103:FATAL:resource_scheduler.cc(891)] Check failed: client_map_.empty(). 
    0   QtWebEngineCore_debug               0x0000000101cff89e _ZN4base5debug10StackTraceC2Ev + 30
    1   QtWebEngineCore_debug               0x0000000101cff8d5 _ZN4base5debug10StackTraceC1Ev + 21
    2   QtWebEngineCore_debug               0x0000000101d54708 _ZN7logging10LogMessageD2Ev + 72
    3   QtWebEngineCore_debug               0x0000000101d529c5 _ZN7logging10LogMessageD1Ev + 21
    4   QtWebEngineCore_debug               0x00000001045af9f8 _ZN7content17ResourceSchedulerD2Ev + 488
    5   QtWebEngineCore_debug               0x00000001045afa65 _ZN7content17ResourceSchedulerD1Ev + 21
    6   QtWebEngineCore_debug               0x0000000104588b9e _ZNK4base14DefaultDeleterIN7content17ResourceSchedulerEEclEPS2_ + 46
    7   QtWebEngineCore_debug               0x0000000104593042 _ZN4base8internal15scoped_ptr_implIN7content17ResourceSchedulerENS_14DefaultDeleterIS3_EEE5resetEPS3_ + 162
    8   QtWebEngineCore_debug               0x000000010458482d _ZN10scoped_ptrIN7content17ResourceSchedulerEN4base14DefaultDeleterIS1_EEE5resetEPS1_ + 29
    9   QtWebEngineCore_debug               0x000000010457623a _ZN7content26ResourceDispatcherHostImpl10OnShutdownEv + 2650
    10  QtWebEngineCore_debug               0x000000010458c9f2 _ZN4base8internal15RunnableAdapterIMN7content26ResourceDispatcherHostImplEFvvEE3RunEPS3_ + 114
    11  QtWebEngineCore_debug               0x000000010458c96c _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIMN7content26ResourceDispatcherHostImplEFvvEEENS0_8TypeListIJPS4_EEEE8MakeItSoES7_S9_ + 44
    12  QtWebEngineCore_debug               0x000000010458c93a _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0EEEENS0_9BindStateINS0_15RunnableAdapterIMN7content26ResourceDispatcherHostImplEFvvEEEFvPS7_ENS0_8TypeListIJNS0_17UnretainedWrapperIS7_EEEEEEENSD_IJNS0_12UnwrapTraitsISF_EEEEENS0_12InvokeHelperILb0EvSA_NSD_IJSB_EEEEEFvvEE3RunEPNS0_13BindStateBaseE + 90
    13  QtWebEngineCore_debug               0x0000000101b3651e _ZNK4base8CallbackIFvvEE3RunEv + 46
    14  QtWebEngineCore_debug               0x0000000101d00c2a _ZN4base5debug13TaskAnnotator7RunTaskEPKcS3_RKNS_11PendingTaskE + 890
    15  QtWebEngineCore_debug               0x0000000101d80341 _ZN4base11MessageLoop7RunTaskERKNS_11PendingTaskE + 417
    16  QtWebEngineCore_debug               0x0000000101d8048c _ZN4base11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE + 76
    17  QtWebEngineCore_debug               0x0000000101d80ab2 _ZN4base11MessageLoop6DoWorkEv + 530
    18  QtWebEngineCore_debug               0x0000000101cc419d _ZN4base19MessagePumpLibevent3RunEPNS_11MessagePump8DelegateE + 141
    19  QtWebEngineCore_debug               0x0000000101d7fdf0 _ZN4base11MessageLoop10RunHandlerEv + 208
    20  QtWebEngineCore_debug               0x0000000101dda6c4 _ZN4base7RunLoop3RunEv + 68
    21  QtWebEngineCore_debug               0x0000000101d7f247 _ZN4base11MessageLoop3RunEv + 247
    22  QtWebEngineCore_debug               0x0000000101e74ed9 _ZN4base6Thread3RunEPNS_11MessageLoopE + 25
    23  QtWebEngineCore_debug               0x0000000103ff3fe8 _ZN7content17BrowserThreadImpl11IOThreadRunEPN4base11MessageLoopE + 56
    24  QtWebEngineCore_debug               0x0000000103ff4166 _ZN7content17BrowserThreadImpl3RunEPN4base11MessageLoopE + 278
    25  QtWebEngineCore_debug               0x0000000101e7542c _ZN4base6Thread10ThreadMainEv + 1292
    26  QtWebEngineCore_debug               0x0000000101e5b83c _ZN4base12_GLOBAL__N_110ThreadFuncEPv + 268
    27  libsystem_pthread.dylib             0x000000011b4359f9 _pthread_body + 131
    28  libsystem_pthread.dylib             0x000000011b435976 _pthread_body + 0
    29  libsystem_pthread.dylib             0x000000011b432fbd thread_start + 13
    

    Am I just using platforms and packages that were never meant to be used? (I don't know what the state of osx support is like in 5.6). Any help appreciated!

    Conversely, if someone knows how to build Qt 5.5.1 with securetransport on OSX 10.11 (this fails also for a variety of issues including sdk and inability to find zlib, etc), maybe they could give me a link.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    To enable Secure Transport just add -securetransportto your configure line.

    What exactly was problematic when build your own Qt ?



  • Hi @SGaist ,

    Thank you for responding so quickly. This is what happened when I tried to build Qt 5.5.1 from scratch.

    1. Download source
    2. /tmp/qt-everywhere-opensource-src-5.5.1/configure -prefix /usr/local/Qt-5.5.1 -release -nomake tests -nomake examples -securetransport -skip qt3D -skip qtwayland -skip qtandroidextras -no-openssl -no-sql-psql -no-sql-sqlite
    3. make

    The failure occured an hour and a half or so in:

    FAILED: if [ ! -e ffmpegsumo.so -o ! -e ffmpegsumo.so.TOC ] || otool -l ffmpegsumo.so | grep -q LC_REEXPORT_DYLIB ; then /usr/bin/clang++ -bundle -Wl,-search_paths_first -stdlib=libc++ -Wl,-dead_strip -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Lgen/third_party/ffmpeg -arch x86_64 -L. -o ffmpegsumo.so @ffmpegsumo.so.rsp && { otool -l ffmpegsumo.so | grep LC_ID_DYLIB -A 5; nm -gP ffmpegsumo.so | cut -f1-2 -d' ' | grep -v U$; true; } > ffmpegsumo.so.TOC; else /usr/bin/clang++ -bundle -Wl,-search_paths_first -stdlib=libc++ -Wl,-dead_strip -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Lgen/third_party/ffmpeg -arch x86_64 -L. -o ffmpegsumo.so @ffmpegsumo.so.rsp && { otool -l ffmpegsumo.so | grep LC_ID_DYLIB -A 5; nm -gP ffmpegsumo.so | cut -f1-2 -d' ' | grep -v U$; true; } > ffmpegsumo.so.tmp && if ! cmp -s ffmpegsumo.so.tmp ffmpegsumo.so.TOC; then mv ffmpegsumo.so.tmp ffmpegsumo.so.TOC ; fi; fi
    clang: error: no such file or directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libz.dylib'
    [3875/10912] CXX obj/src/3rdparty/chromium/third_party/leveldatabase/leveldatabase.env_chromium.o
    ninja: build stopped: subcommand failed.
    make[4]: *** [invoke_ninja] Error 1
    make[3]: *** [sub-gyp_run-pro-make_first] Error 2
    make[2]: *** [sub-core-make_first] Error 2
    make[1]: *** [sub-src-make_first] Error 2
    make: *** [module-qtwebengine-make_first] Error 2
    

    This occurs because /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib contains libz.tbd, not libz.dylib. This seems to be a real bug with with the Qt build system on OSX 10.11 (unless I missed some other build parameter).

    On a later attempt, I tried to pass in -qt-zlib and override the system zlib settings in configure, as described here: http://stackoverflow.com/questions/13008951/configure-qt-with-qt-zlib-is-not-recognized. Unfortunately that also errored out because the zlib version was incompatible in some way.

    I've seen recommendations to also install the OSX 10.10 SDK, but I have not tried this yet. Other solutions would also be really welcome.



  • It looks like there is no OSX 10.11 support listed here: http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations

    This may be my fault for missing the lack of compatibility. Is installing the 10.10 SDK the only option? If so, how do I instruct the makefile to use that instead of 10.11?


  • Lifetime Qt Champion

    Then you should check 5.6 Beta



  • @SGaist That's what I tried first (see first post). I seem to have had more luck with a homebrew version of QT 5.5.1. I can close this issue if it's of no more interest.


  • Lifetime Qt Champion

    Sorry, I missed that 5.6.

    They might have a patch to look at to build Qt on 10.11



  • @SGaist That would be great! Thank you for your help.

    Should I leave this topic as open for now?


  • Lifetime Qt Champion

    Yes, you can mark it a solved when you can confirm that you don't have the crash anymore e.g. with Qt 5.6 RC or the 5.6.0 release.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.