Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.1
-
None
Description
We received sporadic but recurrent complaints about freezing QML windows from users of our application. On first glance, it seemed like the GUI thread got stuck causing the app to freeze. However, that should have caused a macOS "beachball of death" to appear. Instead we got reports like:
When I open a shared folder modal and click on the Invite User button. Visually nothing happens but when I hover over the position the email address field should be present my cursor actually changes into a text cursor. Some time later the gui updates then.
In essence: The app seems to respond to user input but does not actually update the GUI rendering. Once the window lost and regained focus (i.e. by Cmd+Tab-ing away and back to the app) the GUI is rendered once and then freezes up again. Hence, "basic" interaction with the app is still possible, i.e. the GUI thread can't actually be stuck.
This happens on macOS Catalina and using Qt 5.15.1. Please also note, that we set QSG_RENDER_LOOP=basic at the startup of our application.
We requested the user to create a stack trace of the application once it is frozen. Unfortunately, the relevant parts don't really look suspicious to us:
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP * frame #0: 0x00007fff6adccdfa libsystem_kernel.dylib`mach_msg_trap + 10 frame #1: 0x00007fff6adcd170 libsystem_kernel.dylib`mach_msg + 60 frame #2: 0x00007fff30db4ef5 CoreFoundation`__CFRunLoopServiceMachPort + 247 frame #3: 0x00007fff30db39c2 CoreFoundation`__CFRunLoopRun + 1319 frame #4: 0x00007fff30db2e3e CoreFoundation`CFRunLoopRunSpecific + 462 frame #5: 0x00007fff2f9dfabd HIToolbox`RunCurrentEventLoopInMode + 292 frame #6: 0x00007fff2f9df7d5 HIToolbox`ReceiveNextEventCommon + 584 frame #7: 0x00007fff2f9df579 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64 frame #8: 0x00007fff2e025039 AppKit`_DPSNextEvent + 883 frame #9: 0x00007fff2e023880 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352 frame #10: 0x00007fff2e01558e AppKit`-[NSApplication run] + 658 frame #11: 0x000000010b6550c4 libqcocoa.dylib`___lldb_unnamed_symbol691$$libqcocoa.dylib + 2548 frame #12: 0x00000001093a5c77 libQt5Core.5.dylib`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 439 frame #13: 0x00000001093aa192 libQt5Core.5.dylib`QCoreApplication::exec() + 130 frame #14: 0x0000000105f15f66 Bdrive`___lldb_unnamed_symbol733$$Bdrive + 454 frame #15: 0x00007fff6ac8bcc9 libdyld.dylib`start + 1 frame #16: 0x00007fff6ac8bcc9 libdyld.dylib`start + 1 thread #2, name = 'QQmlThread' frame #0: 0x00007fff6add33d6 libsystem_kernel.dylib`poll + 10 frame #1: 0x000000010940c17a libQt5Core.5.dylib`qt_safe_poll(pollfd*, unsigned int, timespec const*) + 474 frame #2: 0x000000010940da08 libQt5Core.5.dylib`QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 968 frame #3: 0x00000001093a5c77 libQt5Core.5.dylib`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 439 frame #4: 0x00000001091e0ba3 libQt5Core.5.dylib`QThread::exec() + 131 frame #5: 0x000000010822e239 libQt5Qml.5.dylib`___lldb_unnamed_symbol5393$$libQt5Qml.5.dylib + 57 frame #6: 0x00000001091e1bb9 libQt5Core.5.dylib`___lldb_unnamed_symbol239$$libQt5Core.5.dylib + 329 frame #7: 0x00007fff6ae90109 libsystem_pthread.dylib`_pthread_start + 148 frame #8: 0x00007fff6ae8bb8b libsystem_pthread.dylib`thread_start + 15