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

Qt Quick apps deadlock on startup on Mojave 10.14.2 (beta)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12
    • 5.9, 5.11, 5.12.0 Beta 4
    • QPA
    • None
    • macOS

    Description

      QCocoaGLContext::makeCurrent(QPlatformSurface*) on the SGRenderThread results in a call to [NSOpenGLContext setView:] (from the render thread) which is not permitted and results in a deadlock.

      This happens when building with Xcode 10 / SDK 10.14. Existing binaries built with Xcode 9 / SDK 10.13 and earlier are not affected.

      Relevant stack traces: 

       thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
       frame #0: 0x00007fff7992e1b2 libsystem_kernel.dylib`__psynch_cvwait + 10
       frame #1: 0x0000000103fd9223 libsystem_pthread.dylib`_pthread_cond_wait + 724
       frame #2: 0x0000000105549c7b QtCore`QWaitConditionPrivate::wait(unsigned long) + 75
       frame #3: 0x0000000105549c12 QtCore`QWaitCondition::wait(QMutex*, unsigned long) + 162
       frame #4: 0x00000001066081a9 QtQuick`QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*, bool) + 1481
       frame #5: 0x00000001066079bd QtQuick`QSGThreadedRenderLoop::handleExposure(QQuickWindow*) + 1117
       frame #6: 0x00000001066074f9 QtQuick`QSGThreadedRenderLoop::exposureChanged(QQuickWindow*) + 281
       frame #7: 0x0000000105b10df1 QtGui`QWindow::event(QEvent*) + 817
       frame #8: 0x0000000106660b47 QtQuick`QQuickWindow::event(QEvent*) + 263
       frame #9: 0x0000000106ac1f12 QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 306
       frame #10: 0x0000000106ac32ed QtWidgets`QApplication::notify(QObject*, QEvent*) + 573
      
       thread #72, name = 'QSGRenderThread'
       frame #0: 0x00007fff7992e1b2 libsystem_kernel.dylib`__psynch_cvwait + 10
       frame #1: 0x0000000103fd9223 libsystem_pthread.dylib`_pthread_cond_wait + 724
       frame #2: 0x0000000105549c7b QtCore`QWaitConditionPrivate::wait(unsigned long) + 75
       frame #3: 0x0000000105549c12 QtCore`QWaitCondition::wait(QMutex*, unsigned long) + 162
       frame #4: 0x0000000105ae536f QtGui`QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 655
       frame #5: 0x0000000105ae50c4 QtGui`bool QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery>(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 180
       frame #6: 0x0000000105aeb4a0 QtGui`void QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::SynchronousDelivery>(QWindow*, QRegion const&) + 192
       frame #7: 0x000000010e399af8 libqcocoa_debug.dylib`QCocoaWindow::handleExposeEvent(QRegion const&) + 904
       frame #8: 0x000000010e3a74bb libqcocoa_debug.dylib`-[QNSView updateRegion:] + 635
       frame #9: 0x000000010e3a71ec libqcocoa_debug.dylib`-[QNSView drawRect:] + 860
       frame #10: 0x00007fff49d41e28 AppKit`-[_NSOpenGLViewBackingLayer display] + 640
       frame #11: 0x00007fff57535568 QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 634
       frame #12: 0x00007fff575237b7 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 319
       frame #13: 0x00007fff57523088 QuartzCore`CA::Transaction::commit() + 576
       frame #14: 0x00007fff496129c4 AppKit`NSPerformVisuallyAtomicChange + 154
       frame #15: 0x00007fff499947ad AppKit`-[NSOpenGLContext setView:] + 99
       frame #16: 0x000000010e3a688f libqcocoa_debug.dylib`-[QNSView setQCocoaGLContext:] + 79
       frame #17: 0x000000010e3f52cd libqcocoa_debug.dylib`QCocoaGLContext::setActiveWindow(QWindow*) + 445
       frame #18: 0x000000010e3f5410 libqcocoa_debug.dylib`QCocoaGLContext::makeCurrent(QPlatformSurface*) + 304
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              sorvig Morten Sørvig
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes