Important: Please read the Qt Code of Conduct -

Graphic Layer related crashes

  • Hi,
    We have QT Application where we have one of widgets contents is drawn using openGL code in Mac. Mac OS initiated windows animations ends up clashing with our internal GL code context and leads to crashing. Since GL context code used in internal application does not expect any other operations except application initiated ones.

    Is there a way to turn of Mac OS initiated windows animations to stop these unintended behaviors in QT application ?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of macOS are running ?
    What version of Qt are you using ?
    Can you provide a minimal compilable example that shows that behaviour ?

  • This is not consistently reproducible and that is the major problem for us to identify better fix.

    But we nailed down the use cases to where the QT window gets closed and reopened and we see MAC animations conflicting during those actions.

    Crash Stack trace is as below:
    Thread 16 Crashed:: Dispatch queue: CA DispatchGroup
    0 libsystem_kernel.dylib 0x00007fff7c8ea23e __pthread_kill + 10
    1 libsystem_pthread.dylib 0x00007fff7c9a0c1c pthread_kill + 285
    2 libsystem_c.dylib 0x00007fff7c8531c9 abort + 127
    3 libGPUSupportMercury.dylib 0x00007fff6b07b1c5 gpusGenerateCrashLog + 168
    4 0x000000011e8a5c23 gpusKillClientExt + 9
    5 libGPUSupportMercury.dylib 0x00007fff6b07c590 gpusSubmitDataBuffers + 165
    6 0x000000011e87e622 glrATI_Hwl_SubmitPacketsWithToken + 110
    7 0x00007fff5a5c2e09 CAOpenGLLayerDraw(CAOpenGLLayer*, double, CVTimeStamp const*, unsigned int) + 2001
    8 0x00007fff5a5c23ca -[CAOpenGLLayer _display] + 579
    9 0x00007fff4ce69b97 -[NSOpenGLLayer display] + 240
    10 0x00007fff5a53c2f0 display_callback(void*, void*) + 64
    11 0x00007fff5a53c24d CA::DispatchGroup::dispatch(bool) + 49
    12 libdispatch.dylib 0x00007fff7c75cdcf _dispatch_client_callout + 8
    13 libdispatch.dylib 0x00007fff7c763124 _dispatch_lane_serial_drain + 618
    14 libdispatch.dylib 0x00007fff7c763bdc _dispatch_lane_invoke + 388
    15 libdispatch.dylib 0x00007fff7c76c090 _dispatch_workloop_worker_thread + 603
    16 libsystem_pthread.dylib 0x00007fff7c99d60b _pthread_wqthread + 409
    17 libsystem_pthread.dylib 0x00007fff7c99d405 start_wqthread + 13

    we are currently using NSOpenGLView backed by NSOpenGLLayer, and preform the setup as called out in option2 in the below answer for our GL based rendering in QT widget :

Log in to reply