Comment 20 for bug 1160353

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I looked at the 3 places we call qFatal in Mixxx and I don't think any of them deserve that we quit -- we could instead handle the error gracefully.

RE: Debugging

I think the only reason we got a nice backtrace from Ewan was because Mixxx deadlocked. Normally on a qCritical/qFatal we would only see a backtrace leading up to the line the debug was issued from. We already know the line the debug was issued from because we can look where the error string occurs in the codebase. So the information the backtrace can tell us is:

1) The call stack leading up to the log message. (definitely useful in this case to see it was a deadlock!)
2) The state of all the other threads.

Since the qCritical will still issue an error dialog the user can use GDB to break and get a backtrace when the error dialog is issued. Since the error dialog is modal it preserves the call-stack that led up to the error dialog being displayed. I think it still allows the user to get us the information we need we just need to tell them how to break GDB using Control-C instead of waiting for a crash to occur.