Segfault when launching from second display in MacOS
YomikoR opened this issue · 1 comments
Confirmed with Qt 5.15 @ Big Sur 11.6
The report
Process: vsedit [54882] Path: /Users/USER/*/vsedit.app/Contents/MacOS/./vsedit Identifier: com.yourcompany.vsedit Version: 0 Code Type: X86-64 (Native) Parent Process: bash [54863] Responsible: Terminal [569] User ID: 501Date/Time: 2021-10-05
OS Version: macOS 11.6 (20G165)
Report Version: 12
Anonymous UUID: 25133CE4-8FFB-435D-A8DA-49E1B2AB7F1F
Time Awake Since Boot: 3300 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [54882]
VM Regions Near 0x10:
-->
__TEXT 105ba3000-105c67000 [ 784K] r-x/r-x SM=COW /Users/*/vsedit.app/Contents/MacOS/vsedit
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.qt-project.QtCore 0x0000000106c20129 QTimer::start() + 9
1 com.yourcompany.vsedit 0x0000000105c2fbbd MainWindow::saveGeometryDelayed() + 109
2 org.qt-project.QtWidgets 0x0000000105d4341a QWidget::event(QEvent*) + 1114
3 org.qt-project.QtWidgets 0x0000000105e53234 QMainWindow::event(QEvent*) + 276
4 org.qt-project.QtWidgets 0x0000000105d0a2f6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
5 org.qt-project.QtWidgets 0x0000000105d0b6ad QApplication::notify(QObject*, QEvent*) + 477
6 org.qt-project.QtCore 0x0000000106be6d66 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 166
7 org.qt-project.QtWidgets 0x0000000105d6279a 0x105cf9000 + 432026
8 org.qt-project.QtWidgets 0x0000000105d60659 0x105cf9000 + 423513
9 org.qt-project.QtWidgets 0x0000000105d0a2f6 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
10 org.qt-project.QtWidgets 0x0000000105d0b6ad QApplication::notify(QObject*, QEvent*) + 477
11 org.qt-project.QtCore 0x0000000106be6d66 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 166
12 org.qt-project.QtGui 0x00000001062e0408 QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) + 488
13 org.qt-project.QtGui 0x00000001062e0c74 QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent*) + 708
14 org.qt-project.QtGui 0x00000001062c47ea void QWindowSystemInterface::handleWindowScreenChangedQWindowSystemInterface::SynchronousDelivery(QWindow*, QScreen*) + 218
15 libqcocoa.dylib 0x0000000107114372 0x1070f2000 + 140146
16 libqcocoa.dylib 0x000000010710df00 0x1070f2000 + 114432
17 libqcocoa.dylib 0x000000010710d960 0x1070f2000 + 112992
18 org.qt-project.QtGui 0x00000001062e9232 QWindowPrivate::create(bool, unsigned long long) + 146
19 org.qt-project.QtWidgets 0x0000000105d31658 QWidgetPrivate::create() + 1208
20 org.qt-project.QtWidgets 0x0000000105d30296 QWidget::create(unsigned long long, bool, bool) + 326
21 org.qt-project.QtWidgets 0x0000000105e8f796 0x105cf9000 + 1664918
22 org.qt-project.QtWidgets 0x0000000105e8f215 0x105cf9000 + 1663509
23 com.yourcompany.vsedit 0x0000000105c2d507 Ui_MainWindow::setupUi(QMainWindow*) + 567
24 com.yourcompany.vsedit 0x0000000105c2c8d6 MainWindow::MainWindow() + 214
25 com.yourcompany.vsedit 0x0000000105c32b51 main + 161
26 libdyld.dylib 0x00007fff203b4f3d start + 1
Thread 1:
0 libsystem_pthread.dylib 0x00007fff20395420 start_wqthread + 0
Thread 2:: Dispatch queue: com.apple.root.background-qos
0 libsystem_kernel.dylib 0x00007fff20364cb6 close + 10
1 com.apple.AppKit 0x00007fff22c9efc3 -[NSPersistentUICrashHandler inspectCrashDataWithModification:handler:] + 738
2 com.apple.AppKit 0x00007fff22e1805c __82-[NSPersistentUIRestorer tearDownStateRestorationApparatusAndResumeWindowOrdering]_block_invoke + 47
3 com.apple.AppKit 0x00007fff237b289d ___NSPersistentUIDispatchQueueAsync_block_invoke + 28
4 libdispatch.dylib 0x00007fff201ee623 _dispatch_call_block_and_release + 12
5 libdispatch.dylib 0x00007fff201ef806 _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff201fe976 _dispatch_root_queue_drain + 676
7 libdispatch.dylib 0x00007fff201fef70 _dispatch_worker_thread2 + 92
8 libsystem_pthread.dylib 0x00007fff20396417 _pthread_wqthread + 244
9 libsystem_pthread.dylib 0x00007fff2039542f start_wqthread + 15
Thread 3:
0 libsystem_pthread.dylib 0x00007fff20395420 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x00007fff20395420 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x00007fff20395420 start_wqthread + 0
Thread 6:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff203642ba mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff2036462c mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff2049149f __CFRunLoopServiceMachPort + 316
3 com.apple.CoreFoundation 0x00007fff2048fb7f __CFRunLoopRun + 1328
4 com.apple.CoreFoundation 0x00007fff2048ef8c CFRunLoopRunSpecific + 563
5 com.apple.AppKit 0x00007fff22e1e23a _NSEventThread + 124
6 libsystem_pthread.dylib 0x00007fff203998fc _pthread_start + 224
7 libsystem_pthread.dylib 0x00007fff20395443 thread_start + 15
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00000000ffffffff rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x000000000012e4e0
rdi: 0x0000000000000000 rsi: 0x000007fec0359403 rbp: 0x00007ffeea05bd80 rsp: 0x00007ffeea05bd70
r8: 0x0000000000008ffc r9: 0x0000000000000014 r10: 0x0000000000000006 r11: 0x0000000106c20120
r12: 0x00007fec034b9550 r13: 0x00007fec034b7c10 r14: 0x00007ffeea05c001 r15: 0x00007ffeea05c0b8
rip: 0x0000000106c20129 rfl: 0x0000000000010206 cr2: 0x0000000000000010
Logical CPU: 0
Error Code: 0x00000004 (no mapping for user data read)
Trap Number: 14
Thread 0 instruction stream:
fb 48 8d 05 ff af 32 00-48 89 07 8b 77 10 83 fe .H....2.H...w...
ff 74 0f 48 89 df e8 2c-01 ff ff c7 43 10 ff ff .t.H...,....C...
ff ff 48 89 df e8 3d e4-fe ff 48 89 df 5b 41 5e ..H...=...H..[A^
5d e9 21 7e 13 00 49 89-c6 48 89 df e8 26 e4 fe ].!~..I..H...&..
ff 4c 89 f7 e8 ce e4 de-ff 66 2e 0f 1f 84 00 00 .L.......f......
00 00 00 0f 1f 40 00 55-48 89 e5 53 50 48 89 fb .....@.UH..SPH..
[8b]77 10 83 fe ff 74 0f-48 89 df e8 d7 00 ff ff .w....t.H....... <==
c7 43 10 ff ff ff ff 8b-73 14 8b 53 1c 8d 04 12 .C......s..S....
24 02 31 c9 85 f6 0f b6-c0 0f 45 c1 89 d1 80 e1 $.1.......E.....
fd 08 c1 88 4b 1c c1 ea-02 83 e2 03 48 89 df e8 ....K.......H...
73 ff fe ff 89 43 10 48-83 c4 08 5b 5d c3 66 0f s....C.H...[].f.
1f 84 00 00 00 00 00 55-48 89 e5 53 50 48 89 fb .......UH..SPH..
Thread 0 last branch register state not available.
Binary Images:
In short: creating a native menu bar on second screen was performed in an illegal way. I don't have time to actually fix it though.
https://doc.qt.io/qt-5/macos-issues.html#menu-bar