#5951 closed enhancement (fixed)
Put Qt fatal message output into bug reports
Reported by: | Tom Goddard | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Infrastructure | Version: | |
Keywords: | Cc: | pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
We see many crashes on Windows in the Qt event loop. Maybe we would get a useful error message if we captures the Qt fatal error messages in the bug reports. Currently in Chimerax ui/gui.py in redirect_qt_messages() we register a message handler which writes messages of type QtMsgType?.QtFatalMsg? to sys.stderr That will just vanish on Windows since there is no console window. Maybe instead we should write those messages to a file that the ChimeraX bug reporter looks for and includes in crash bug reports.
Change History (5)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
I suspect this isn't going to help much because most of the crashes in the Qt event loop are "access violation", so Qt was probably not expecting this and did not produces any fatal error message. But in rare cases the event-loop crash says "Fatal Python error: Aborted", which is possibly Qt calling abort() and possibly those would have a useful Qt error message. An example is #5929 or #5953.
To get useful crash info on Windows and Linux we will need some ability to get a C++ stack trace.
comment:3 by , 3 years ago
Ticket #6949 on Mac is a good example where seeing the Qt fatal error message in a crash report would probably make clear what caused the crash.
comment:4 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Done.
Qt fatal errors will now be written to the faulthandler log file so they will appear in crash reports. It is not clear how many of the ChimeraX Qt crashes actually issue a Qt fatal error message but we will see.
I tested this with the ChimeraX Python shell
from Qt.QtCore import qFatal
qFatal("Test issuing a fatal error in Qt")
and it correctly put the message into the crash report.
An example where this might help is ticket #5946