Solved Qt software debugging techniques
-
Hi! I have the application which is published to the
Microsoft Store
, under health page for the application in theDev center
, it reports crash issue:fail_fast_fatal_app_exit_c0000409_qt5core.dll!qt_logging_to_console
And stack trace:
0 ucrtbase.dll abort 0x000000000000004E 1 Qt5Core.dll qt_logging_to_console 0x000000000000017A 2 Qt5Core.dll QMessageLogger::fatal 0x0000000000000093 3 Qt5Gui.dll QPixmap::paintEngine 0x0000000000000052 4 Qt5Gui.dll QPixmap::QPixmap 0x0000000000000037
When debugging the application I don't get any crashes. The question is how to get the crash location or function line/name in the code by the stack trace? Any ideas? Thanks.
-
Hi,
If you have a crash in release mode and not in debug, check that you properly initialise all your pointer variables.
-
Thanks, but the project is big and checking all pointer variables is not an option. I need at least name of source file or class to check for it.
-
Out of curiosity, how big is that ?
-
It's about 286 files.
-
I feared it was a bigger number.
From you stack trace, it's QPixmap related, so you should start by checking the parts which are using or creating QPixmap.
-
Ok. I will check it and reply later. Thanks.
-
You was right. I think the problem was with programs icons creation/destruction on the fly and
DestroyIcon
destroyed the handle which was in use.I added some improvements, now it only creates 1 object of
HICON
andQPixmap
, then appends to the structure in the loop and after the loop exited it callsDestroyIcon
function to destroy theHICON
handle.Also I have found this article about finding bugs from the
Microsoft Store
:
https://stackoverflow.com/questions/41527577/how-to-get-a-crash-dump-or-any-usable-crash-report-for-a-converted-windows-stoBut also I'm going to try
StackWalker
application to check for other issues. Thank you.