Disable segfault reports for Qt mainloop crashes

This commit is contained in:
Florian Bruhin 2016-05-04 21:50:44 +02:00
parent 3f66ea1a10
commit 034f8585a6

View File

@ -80,18 +80,19 @@ def get_fatal_crash_dialog(debug, data):
data: The crash log data. data: The crash log data.
""" """
errtype, frame = parse_fatal_stacktrace(data) errtype, frame = parse_fatal_stacktrace(data)
if (qtutils.version_check('5.4') or errtype != 'Segmentation fault' or
frame != 'qt_mainloop'): if errtype == 'Segmentation fault' and frame == 'qt_mainloop':
return FatalCrashDialog(debug, data)
else:
title = "qutebrowser was restarted after a fatal crash!" title = "qutebrowser was restarted after a fatal crash!"
text = ("<b>qutebrowser was restarted after a fatal crash!</b><br/>" text = ("<b>qutebrowser was restarted after a fatal crash!</b><br/>"
"Unfortunately, this crash occurred in Qt (the library " "Unfortunately, this crash occurred in Qt (the library "
"qutebrowser uses), and your version ({}) is outdated - " "qutebrowser uses), and QtWebKit (the current backend) is not "
"Qt 5.4 or later is recommended. Unfortunately Debian and " "maintained anymore.<br/><br/>Since I can't do much about "
"Ubuntu don't ship a newer version (yet?)...".format( "those crashes I disabled the crash reporter for this case, "
qVersion())) "but this will likely be resolved in the future with the new "
"QtWebEngine backend.")
return QMessageBox(QMessageBox.Critical, title, text, QMessageBox.Ok) return QMessageBox(QMessageBox.Critical, title, text, QMessageBox.Ok)
else:
return FatalCrashDialog(debug, data)
def _get_environment_vars(): def _get_environment_vars():