From 034f8585a6f72a1df1f26e71496b3a9a30883342 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 4 May 2016 21:50:44 +0200 Subject: [PATCH] Disable segfault reports for Qt mainloop crashes --- qutebrowser/misc/crashdialog.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index 1d23ff839..6648ed79b 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -80,18 +80,19 @@ def get_fatal_crash_dialog(debug, data): data: The crash log data. """ errtype, frame = parse_fatal_stacktrace(data) - if (qtutils.version_check('5.4') or errtype != 'Segmentation fault' or - frame != 'qt_mainloop'): - return FatalCrashDialog(debug, data) - else: + + if errtype == 'Segmentation fault' and frame == 'qt_mainloop': title = "qutebrowser was restarted after a fatal crash!" text = ("qutebrowser was restarted after a fatal crash!
" "Unfortunately, this crash occurred in Qt (the library " - "qutebrowser uses), and your version ({}) is outdated - " - "Qt 5.4 or later is recommended. Unfortunately Debian and " - "Ubuntu don't ship a newer version (yet?)...".format( - qVersion())) + "qutebrowser uses), and QtWebKit (the current backend) is not " + "maintained anymore.

Since I can't do much about " + "those crashes I disabled the crash reporter for this case, " + "but this will likely be resolved in the future with the new " + "QtWebEngine backend.") return QMessageBox(QMessageBox.Critical, title, text, QMessageBox.Ok) + else: + return FatalCrashDialog(debug, data) def _get_environment_vars():