Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt software debugging techniques
Cobra91151 last edited by Cobra91151
Hi! I have the application which is published to the
Microsoft Store, under health page for the application in the
Dev center, it reports crash issue:
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.
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
DestroyIcondestroyed the handle which was in use.
I added some improvements, now it only creates 1 object of
QPixmap, then appends to the structure in the loop and after the loop exited it calls
DestroyIconfunction to destroy the
Also I have found this article about finding bugs from the
But also I'm going to try
StackWalkerapplication to check for other issues. Thank you.