Heads up: Setting the Qt::WA_MacAlwaysShowToolWindow flag might cause crashes in macOS 10.13 and 10.12
-
I don't have time to track down what really happened, so instead I just post this topic here in case anyone has problems with crashes on 10.13 and 10.12. The problem was not so notable when I used Qt 5.7.1, but when I upgraded to Qt 5.10.0, my program crashed almost instantly in 10.13 (which was good). I also got crash reports on 1012, although I wasn't able to make 10.12 crash myself.
Anyway, after A LOT of investigation, I finally found the cause, and as you see below, the backtrace isnt't much help.
4 libsystem_platform.dylib 0x00007fff60a79f5a _sigtramp 26 5 ??? 0x000000014f3fc080 0 5624545408 6 libqcocoa.dylib 0x0000000108ee2524 0x108eba000 165156 7 com.apple.CoreFoundation 0x00007fff3920d1ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ 12 8 com.apple.CoreFoundation 0x00007fff3920d09a _CFXRegistrationPost 442 9 com.apple.CoreFoundation 0x00007fff3920cde2 ___CFXNotificationPost_block_invoke 50 10 com.apple.CoreFoundation 0x00007fff391cb972 -[_CFXNotificationRegistrar find:object:observer:enumerator:] 1826 11 com.apple.CoreFoundation 0x00007fff391caa0c _CFXNotificationPost 652 12 com.apple.Foundation 0x00007fff3b2a3477 -[NSNotificationCenter postNotificationName:object:userInfo:] 66 13 com.apple.AppKit 0x00007fff36c238c2 -[NSApplication _handleActivatedEvent:] 714 14 com.apple.AppKit 0x00007fff36f9da39 -[NSApplication(NSEvent) sendEvent:] 2969 15 libqcocoa.dylib 0x0000000108ee720d 0x108eba000 184845 16 com.apple.AppKit 0x00007fff367ff28d -[NSApplication run] 812 17 libqcocoa.dylib 0x0000000108ee4333 0x108eba000 172851 18 QtCore 0x000000010346cc87 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 325 19 QtCore 0x00000001034707a2 QCoreApplication::exec() 276
-
@kmatheussen if you want to get it fixed, you should report the issue on bugreports.qt.io
They might ask you for a minimal reproduceable example, though.
Thanks.
-
Yeah, maybe later. As I wrote, I don't have time now. The program is several hundred thousand lines long, and this line was in a general utility function that could have been called from a lot of places, so it's a lot of work to create a minimal example.
-
Here's the github commit: https://github.com/kmatheussen/radium/commit/566b59629812c860bcb94a51a1808c2adbc245fc
-
Also, I'm happy now. I don't need a fix. This is just a heads up post for others who might have the same problem.
-
@kmatheussen
Good work finding it in such large program :)