Qt 6.11 is out! See what's new in the release
blog
How to get full stacktree?
-
In my application I would like to implement the CrashHAndler from the link below to capture the stacktree. I've created a simple mainwindow application with one crash button. I compiled the application and tested on Qt15.5 MinGW8.1 and Qt5.3 MinGw4.8. Both in debug version. However, I noticed that MinGw 4.8 provides very little information. I need MinGw4.8. I've included both stacktrees below
MinGW4.8:
Thread 1 (Thread 30116.0x8454): #0 0x77c72a7c in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll #1 0x77388eb9 in WaitForSingleObjectEx () from C:\Windows\System32\KernelBase.dll #2 0x77388e12 in WaitForSingleObject () from C:\Windows\System32\KernelBase.dll #3 0x6b8fa2f0 in QProcessPrivate::waitForFinished (this=0x1483ae60, msecs=-1) at io\qprocess_win.cpp:777 #4 0x6b8b891f in QProcess::waitForFinished (this=0x7cc054, msecs=-1) at io\qprocess.cpp:1841 #5 0x00401d4c in GdbCrashHandler::signalHandler (signal=11) at ..\CrashHandlerApp\GdbCrashHandler.cpp:54 #6 0x004052b6 in _gnu_exception_handler@4 () #7 0x77452572 in UnhandledExceptionFilter () from C:\Windows\System32\KernelBase.dll #8 0x007cc164 in ?? () #9 0x77ca495e in ntdll!RtlCaptureStackContext () from C:\Windows\SYSTEM32\ntdll.dll #10 0x77c67aee in ntdll!RtlGetAppContainerNamedObjectPath () from C:\Windows\SYSTEM32\ntdll.dll #11 0x00000000 in ?? ()MinGw8.1:
Thread 1 (Thread 2652.0x2f74): #0 0x00007ffabf56d064 in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll #1 0x00007ffabce130ce in WaitForSingleObjectEx () from C:\Windows\System32\KernelBase.dll #2 0x00000000689fd1ea in QProcessPrivate::waitForFinished(int) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #3 0x00000000689f6a0c in QProcess::waitForFinished(int) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #4 0x0000000000401d8f in GdbCrashHandler::signalHandler (signal=11) at ..\CrashHandlerApp\GdbCrashHandler.cpp:54 #5 0x0000000000406ba7 in _gnu_exception_handler () #6 0x00007ffabddb7ff8 in msvcrt!__C_specific_handler () from C:\Windows\System32\msvcrt.dll #7 0x00007ffabf5723af in ntdll!.chkstk () from C:\Windows\SYSTEM32\ntdll.dll #8 0x00007ffabf5214b4 in ntdll!RtlRaiseException () from C:\Windows\SYSTEM32\ntdll.dll #9 0x00007ffabf570ebe in ntdll!KiUserExceptionDispatcher () from C:\Windows\SYSTEM32\ntdll.dll #10 0x0000000000401bea in MainWindow::on_pushButton_clicked (this=0x95fcd0) at ..\CrashHandlerApp\mainwindow.cpp:20 #11 0x00000000004051b7 in MainWindow::qt_static_metacall (_o=0x95fcd0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x95bc40) at debug\moc_mainwindow.cpp:72 #12 0x00000000004052d3 in MainWindow::qt_metacall (this=0x95fcd0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x95bc40) at debug\moc_mainwindow.cpp:109 #13 0x0000000068b975ed in void doActivate<false>(QObject*, int, void**) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #14 0x0000000001324bb2 in QAbstractButtonPrivate::emitClicked() () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #15 0x0000000001326057 in QAbstractButtonPrivate::click() () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #16 0x00000000013261d1 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #17 0x0000000001283d78 in QWidget::event(QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #18 0x000000000124790e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #19 0x000000000124f1ea in QApplication::notify(QObject*, QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #20 0x0000000068a65f78 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #21 0x000000000124d83b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #22 0x0000000001299962 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #23 0x000000000129cc06 in QWidgetWindow::event(QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #24 0x000000000124790e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #25 0x000000000124e3e3 in QApplication::notify(QObject*, QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Widgets.dll #26 0x0000000068a65f78 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #27 0x000000006197a0a4 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Gui.dll #28 0x000000006197b3d5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Gui.dll #29 0x000000006195722d in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Gui.dll #30 0x0000000068abc0b0 in QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #31 0x000000006a903755 in QWindowsGuiEventDispatcher::processEvents (this=0x1cb7e0, flags=...) at qwindowsguieventdispatcher.cpp:73 #32 0x0000000068a64405 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #33 0x0000000068a6d765 in QCoreApplication::exec() () from C:\Qt\5.15.2\mingw81_64\bin\Qt5Core.dll #34 0x0000000000401a00 in qMain (argc=1, argv=0x1c7c10) at ..\CrashHandlerApp\main.cpp:96 #35 0x000000000040737d in WinMain () at qtmain_win.cpp:97 #36 0x00000000004013c7 in __tmainCRTStartup () #37 0x00000000004014cb in WinMainCRTStartup ()MinGw8.1 provides more detailed information such as that a button has been pressed. How to get the same effect with MinGw4.8? I have a feeling that this information should be under the question marks. Does anything need to be installed?