-
-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Hi, this is an issue which I'm not sure where the problem is. The current Krita nightly builds on https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/ uses llvm-mingw 20220323, with dependencies (Qt included) built with the -g1 flag for line number tables debugging info only. When doing backtrace, Some Qt functions shows incomplete function names (class names stripped) and missing argument types.
To check with lldb you need a build with https://reviews.llvm.org/D126367 included. First extract the binary zip, then extract the -dbg.zip package inside it. Set a breakpoint at KisMainWindow::showAboutApplication
, then run and choose from the menu "Help -> About Krita" to trigger the breakpoint.
With gdb:
Click to expand
D:\temp>D:\dev\toolchain\mingw\x86_64-11.2.0-release-posix-seh-rt_v9-rev1\bin\gdb.exe C:\Users\Alvin\Downloads\krita-nightly-x64-5.1.0-prealpha-b123708256\bin\krita.exe
[...]
(gdb) b KisMainWindow::showAboutApplication
Function "KisMainWindow::showAboutApplication" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (KisMainWindow::showAboutApplication) pending.
(gdb) r
Starting program: C:\Users\Alvin\Downloads\krita-nightly-x64-5.1.0-prealpha-b123708256\bin\krita.exe
[...]
Thread 1 hit Breakpoint 1, KisMainWindow::showAboutApplication (this=0x2117be1ba70)
at C:/Packaging/workspace/Krita_Nightly_Windows_Build/krita/libs/ui/KisMainWindow.cpp:2695
2695 C:/Packaging/workspace/Krita_Nightly_Windows_Build/krita/libs/ui/KisMainWindow.cpp: No such file or directory.
(gdb) bt
#0 KisMainWindow::showAboutApplication (this=0x2117be1ba70)
at C:/Packaging/workspace/Krita_Nightly_Windows_Build/krita/libs/ui/KisMainWindow.cpp:2695
#1 0x00007ffc442cea08 in activate ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qobject.cpp:3804
#2 0x00007ffc442cea08 in activate ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qobject.cpp:3804
#3 0x00007ffc4abf3a42 in activate ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qaction.cpp:1166
#4 0x00007ffc4ad61898 in activateCausedStack ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\widgets/qmenu.cpp:1356
#5 0x00007ffc4ad5f031 in activateAction ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\widgets/qmenu.cpp:1433
#6 0x00007ffc4ac34362 in event () at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qwidget.cpp:8967
#7 0x00007ffc4ad66149 in event () at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\widgets/qmenu.cpp:3070
#8 0x00007ffc4abfc756 in notify_helper ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qapplication.cpp:3650
#9 0x00007ffc4abff42c in notify ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qapplication.cpp:3110
#10 0x00007ffc533019e8 in KisApplication::notify (this=0xa01c9cf758, receiver=0x2110a58fc40, event=0xa01c9cba40)
at C:/Packaging/workspace/Krita_Nightly_Windows_Build/krita/libs/ui/KisApplication.cpp:758
#11 0x00007ffc442a1353 in notifyInternal2 ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qcoreapplication.cpp:1088
#12 0x00007ffc4abfd041 in sendMouseEvent ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qapplication.cpp:2648
#13 0x00007ffc4ac52766 in handleMouseEvent ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qwidgetwindow.cpp:570
#14 0x00007ffc4ac50e28 in event ()
--Type <RET> for more, q to quit, c to continue without paging--
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qwidgetwindow.cpp:293
#15 0x00007ffc4abfc756 in notify_helper ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qapplication.cpp:3650
#16 0x00007ffc4abfd96e in notify ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\widgets\kernel/qapplication.cpp:3005
#17 0x00007ffc533019e8 in KisApplication::notify (this=0xa01c9cf758, receiver=0x2110b67c540, event=0xa01c9cbf40)
at C:/Packaging/workspace/Krita_Nightly_Windows_Build/krita/libs/ui/KisApplication.cpp:758
#18 0x00007ffc442a1353 in notifyInternal2 ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qcoreapplication.cpp:1088
#19 0x00007ffc496f034a in processMouseEvent ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\gui\kernel/qguiapplication.cpp:2167
#20 0x00007ffc496d8f5b in sendWindowSystemEvents ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\gui\kernel/qwindowsysteminterface.cpp:1157
#21 0x00007ffc442f32e3 in qt_internal_proc ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qeventdispatcher_win.cpp:248
#22 0x00007ffca48ce7e8 in USER32!CallWindowProcW () from C:\WINDOWS\System32\user32.dll
#23 0x00007ffca48ce229 in USER32!DispatchMessageW () from C:\WINDOWS\System32\user32.dll
#24 0x00007ffc442f47c3 in processEvents ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qeventdispatcher_win.cpp:642
#25 0x00007ffc577231e5 in QWindowsGuiEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\platformsupport\eventdispatchers/qwindowsguieventdispatcher.cpp:74
#26 0x00007ffc4429e195 in processEvents ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qeventloop.cpp:138
#27 exec () at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qeventloop.cpp:225
#28 0x00007ffc442a19cd in exec ()
at C:\Packaging\KritaDepsBuild\ext_qt\s\qtbase\src\corelib\kernel/qcoreapplication.cpp:1389
--Type <RET> for more, q to quit, c to continue without paging--
#29 0x00007ffc53f857b7 in krita_main (argc=<optimized out>, argv=0x2117094efb0)
at C:/Packaging/workspace/Krita_Nightly_Windows_Build/krita/krita/main.cc:717
#30 0x00007ff7020f13d7 in __tmainCRTStartup () at ../crt/crtexe.c:321
#31 0x00007ff7020f1156 in WinMainCRTStartup () at ../crt/crtexe.c:176
With lldb:
Click to expand
D:\temp>C:\Users\Alvin\Downloads\lldb_test\lldb.exe C:\Users\Alvin\Downloads\krita-nightly-x64-5.1.0-prealpha-b123708256\bin\krita.exe
(lldb) target create "C:\\Users\\Alvin\\Downloads\\krita-nightly-x64-5.1.0-prealpha-b123708256\\bin\\krita.exe"
(lldb) Current executable set to 'C:\Users\Alvin\Downloads\krita-nightly-x64-5.1.0-prealpha-b123708256\bin\krita.exe' (x86_64).
(lldb) b KisMainWindow::showAboutApplication
Breakpoint 1: where = libkritaui.dll`KisMainWindow::showAboutApplication() + 13 at KisMainWindow.cpp:2695:25, address = 0x0000000180524fcd
(lldb) r
Process 26716 launched: 'C:\Users\Alvin\Downloads\krita-nightly-x64-5.1.0-prealpha-b123708256\bin\krita.exe' (x86_64)
Process 26716 stopped
* thread #1, stop reason = breakpoint 1.1
frame #0: 0x00007ffc53354fcd libkritaui.dll`KisMainWindow::showAboutApplication(this=0x000001da7a6d0880) at KisMainWindow.cpp:2695:25
(lldb) bt
* thread #1, stop reason = breakpoint 1.1
* frame #0: 0x00007ffc53354fcd libkritaui.dll`KisMainWindow::showAboutApplication(this=0x000001da7a6d0880) at KisMainWindow.cpp:2695:25
frame #1: 0x00007ffc442cea08 Qt5Core.dll`::activate() at qobject.cpp:3804:21
frame #2: 0x00007ffc5a584636 libkritawidgetutils.dll`KisKHelpMenu::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [inlined] KisKHelpMenu::showAboutApplication(this=<unavailable>) at moc_khelpmenu.cpp:174:5 [artificial]
frame #3: 0x00007ffc442cea08 Qt5Core.dll`::activate() at qobject.cpp:3804:21
frame #4: 0x00007ffc4abf3a42 Qt5Widgets.dll`::activate() at qaction.cpp:0
frame #5: 0x00007ffc4ad61898 Qt5Widgets.dll`::activateCausedStack() at qmenu.cpp:1356:17
frame #6: 0x00007ffc4ad5f031 Qt5Widgets.dll`::activateAction() at qmenu.cpp:1433:5
frame #7: 0x00007ffc4ac34362 Qt5Widgets.dll`::event() at qwidget.cpp:8967:9
frame #8: 0x00007ffc4ad66149 Qt5Widgets.dll`::event() at qmenu.cpp:3070:21
frame #9: 0x00007ffc4abfc756 Qt5Widgets.dll`::notify_helper() at qapplication.cpp:3650:26
frame #10: 0x00007ffc4abff42c Qt5Widgets.dll`::notify() at qapplication.cpp:3110:30
frame #11: 0x00007ffc533019e8 libkritaui.dll`KisApplication::notify(this=0x0000002df74ff318, receiver=0x000001da095c1300, event=0x0000002df74fb600) at KisApplication.cpp:758:40
frame #12: 0x00007ffc442a1353 Qt5Core.dll`::notifyInternal2() at qcoreapplication.cpp:1088:18
frame #13: 0x00007ffc4abfd041 Qt5Widgets.dll`::sendMouseEvent() at qapplication.cpp:2648:22
frame #14: 0x00007ffc4ac52766 Qt5Widgets.dll`::handleMouseEvent() at qwidgetwindow.cpp:570:17
frame #15: 0x00007ffc4ac50e28 Qt5Widgets.dll`::event() at qwidgetwindow.cpp:293:9
frame #16: 0x00007ffc4abfc756 Qt5Widgets.dll`::notify_helper() at qapplication.cpp:3650:26
frame #17: 0x00007ffc4abfd96e Qt5Widgets.dll`::notify() at qapplication.cpp:0
frame #18: 0x00007ffc533019e8 libkritaui.dll`KisApplication::notify(this=0x0000002df74ff318, receiver=0x000001da0a43efe0, event=0x0000002df74fbb00) at KisApplication.cpp:758:40
frame #19: 0x00007ffc442a1353 Qt5Core.dll`::notifyInternal2() at qcoreapplication.cpp:1088:18
frame #20: 0x00007ffc496f034a Qt5Gui.dll`::processMouseEvent() at qguiapplication.cpp:2167:5
frame #21: 0x00007ffc496d8f5b Qt5Gui.dll`::sendWindowSystemEvents() at qwindowsysteminterface.cpp:1157:13
frame #22: 0x00007ffc442f32e3 Qt5Core.dll`::qt_internal_proc() at qeventdispatcher_win.cpp:248:16
frame #23: 0x000000018000e7e8 user32.dll`CallWindowProcW + 1016
frame #24: 0x000000018000e229 user32.dll`DispatchMessageW + 601
frame #25: 0x00007ffc442f47c3 Qt5Core.dll`::processEvents() at qeventdispatcher_win.cpp:642:21
frame #26: 0x00007ffc577231e5 qwindows.dll`qt_plugin_instance at qwindowsguieventdispatcher.cpp:74:44
frame #27: 0x00007ffc4429e195 Qt5Core.dll`::exec() [inlined] processEvents at qeventloop.cpp:138:51
frame #28: 0x00007ffc4429e177 Qt5Core.dll`::exec() at qeventloop.cpp:225:9
frame #29: 0x00007ffc442a19cd Qt5Core.dll`::exec() at qcoreapplication.cpp:1389:32
frame #30: 0x00007ffc53f857b7 krita.dll`krita_main + 17287
frame #31: 0x00007ff7020f13d7 krita.exe`__tmainCRTStartup at crtexe.c:321:15
frame #32: 0x00007ff7020f1156 krita.exe`WinMainCRTStartup at crtexe.c:176:9
frame #33: 0x00007ffca5047034 kernel32.dll`BaseThreadInitThunk + 20
frame #34: 0x00007ffca66c2651 ntdll.dll`RtlUserThreadStart + 33
For example, the activate
function in qobject.cpp:3804
is supposed to be QMetaObject::activate
and the one in qaction.cpp
should be QAction::activate
.
Code inside Krita is built with -g
and contains proper function signatures.
In contrast, this is what it would look like without debug info (it uses the export table names if I haven't mistaken):
Click to expand
(lldb) bt
* thread #1, stop reason = breakpoint 1.1
* frame #0: 0x00007ffc4adb4fc0 libkritaui.dll`KisMainWindow::showAboutApplication()
frame #1: 0x00007ffc442cea08 Qt5Core.dll`QMetaObject::activate(QObject*, int, int, void**) + 2136
frame #2: 0x00007ffc442cea08 Qt5Core.dll`QMetaObject::activate(QObject*, int, int, void**) + 2136
frame #3: 0x00007ffc52ae3a42 Qt5Widgets.dll`QAction::activate(QAction::ActionEvent) + 210
frame #4: 0x00007ffc52c51898 Qt5Widgets.dll`QMenu::setIcon(QIcon const&) + 5848
frame #5: 0x00007ffc52c4f031 Qt5Widgets.dll`QMenu::internalDelayedPopup() + 2257
frame #6: 0x00007ffc52b24362 Qt5Widgets.dll`QWidget::event(QEvent*) + 1522
frame #7: 0x00007ffc52c56149 Qt5Widgets.dll`QMenu::event(QEvent*) + 1049
frame #8: 0x00007ffc52aec756 Qt5Widgets.dll`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
frame #9: 0x00007ffc52aef42c Qt5Widgets.dll`QApplication::notify(QObject*, QEvent*) + 7340
frame #10: 0x00007ffc4ad619e8 libkritaui.dll`KisApplication::notify(QObject*, QEvent*) + 168
frame #11: 0x00007ffc442a1353 Qt5Core.dll`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 147
frame #12: 0x00007ffc52aed041 Qt5Widgets.dll`QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 897
frame #13: 0x00007ffc52b42766 Qt5Widgets.dll`QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) + 12934
frame #14: 0x00007ffc52b40e28 Qt5Widgets.dll`QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) + 6472
frame #15: 0x00007ffc52aec756 Qt5Widgets.dll`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
frame #16: 0x00007ffc52aed96e Qt5Widgets.dll`QApplication::notify(QObject*, QEvent*) + 494
frame #17: 0x00007ffc4ad619e8 libkritaui.dll`KisApplication::notify(QObject*, QEvent*) + 168
frame #18: 0x00007ffc442a1353 Qt5Core.dll`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 147
frame #19: 0x00007ffc435f034a Qt5Gui.dll`QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3018
frame #20: 0x00007ffc435d8f5b Qt5Gui.dll`QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 235
frame #21: 0x00007ffc442f32e3 Qt5Core.dll`QEventDispatcherWin32Private::activateEventNotifier(QWinEventNotifier*) + 771
frame #22: 0x00007ffca48ce7e8 user32.dll`CallWindowProcW + 1016
frame #23: 0x00007ffca48ce229 user32.dll`DispatchMessageW + 601
frame #24: 0x00007ffc442f47c3 Qt5Core.dll`QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1987
frame #25: 0x00007ffc58b731e5 qwindows.dll`qt_plugin_instance + 11173
frame #26: 0x00007ffc4429e195 Qt5Core.dll`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 485
frame #27: 0x00007ffc442a19cd Qt5Core.dll`QCoreApplication::exec() + 109
frame #28: 0x00007ffc530357b7 krita.dll`krita_main + 17287
frame #29: 0x00007ff7020f13d7 krita.exe`__tmainCRTStartup + 631
frame #30: 0x00007ff7020f1156 krita.exe`.l_startw + 18
frame #31: 0x00007ffca5047034 kernel32.dll`BaseThreadInitThunk + 20
frame #32: 0x00007ffca66c2651 ntdll.dll`RtlUserThreadStart + 33
I tried to make a small self-contained example, but that doesn't show the issue, so I am not quite sure if it is really caused by the use of -g1
. I also have not tried doing this build with GCC to see how it behaves (I can try but it will take a few hours and some disk space...)