Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.6, 5.9.2
-
None
Description
Has it ever been considered to make qFatal() a bit more user-friendly?
- depending on the platform, the message isn't shown (except possibly hidden in the post-mortem backtrace). That means users just see the application crash and have little way to know this is intended behaviour.
- whatever happened may not be so fatal a crash is warranted.
What I could see is something like you get in (La)Tex. I imagine a dialog being presented which shows the fatality message and then provides the user with 2 or 3 options:
1- "Debug (causes a crash)
2- "Exit"
3- "Proceed with eyes crossed"
Option 2 will take care of at least a partly graceful shutdown and should be safe in most situations. Option 3 could be activated by the developer and be useful in defensive programming, to handle situations that shouldn't arise but aren't actually fatal (and code would of course handle a return-from-qFatal() intelligently when it activates the option).
Evidently this is relevant mostly for GUI applications, much less so for console-based applications. ("QXcbConnection: Could not connect to display - do you want to debug this?" )
I'm attaching a patch for Qt/Mac which I've been using for quite a while. I find that I can use the "Exit" option most of the time, without running into the system CrashReporter (which is the main point).
Attachments
Issue Links
- is duplicated by
-
QTBUG-106192 Program crashes with unset or incorrect DISPLAY variable
- Closed