summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-01-29 10:26:23 +0100
committerFlorian Bruhin <me@the-compiler.org>2022-01-29 10:26:23 +0100
commitfd277275f4e1829e1c9c6d485cd6967b43b3d54b (patch)
tree749a6cc5dbe0510361205a0a3fef673ad0e6a42e
parent02f331b89c7458d5ae0ccb973a0fdcfbbce21441 (diff)
downloadqutebrowser-fd277275f4e1829e1c9c6d485cd6967b43b3d54b.tar.gz
qutebrowser-fd277275f4e1829e1c9c6d485cd6967b43b3d54b.zip
Handle UnicodeDecodeError when reading faulthandler log
-rw-r--r--doc/changelog.asciidoc2
-rw-r--r--qutebrowser/misc/crashsignal.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index a446ec534..100d4151f 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -70,6 +70,8 @@ Fixed
shown when closing the last window (rather than closing any window, which
would continue running that window's downloads). Unfortunately, more issues
with `confirm_quit` and multiple windows remain.
+- Crash when a previous crash-log file contains non-ASCII characters (which
+ should never happen unless it was edited manually)
[[v2.4.1]]
v2.4.1 (unreleased)
diff --git a/qutebrowser/misc/crashsignal.py b/qutebrowser/misc/crashsignal.py
index f7578a07f..d94d3ec54 100644
--- a/qutebrowser/misc/crashsignal.py
+++ b/qutebrowser/misc/crashsignal.py
@@ -100,7 +100,7 @@ class CrashHandler(QObject):
# There's no log file, so we can use this to display crashes to
# the user on the next start.
self._init_crashlogfile()
- except OSError:
+ except (OSError, UnicodeDecodeError):
log.init.exception("Error while handling crash log file!")
self._init_crashlogfile()