Add debug logging for failed WebEngineHistory deserialization
This sometimes fails with 'The data stream has read past the end of the data in the underlying device', which turns up in crash reports around once a month. This is somewhat similar to https://bugreports.qt.io/browse/QTBUG-117489 - but without knowing the data and without being able to reproduce, it's unclear what the culprit could be.
This commit is contained in:
parent
048b5e59d6
commit
1b5fd18c83
|
|
@ -626,7 +626,14 @@ class WebEngineHistoryPrivate(browsertab.AbstractHistoryPrivate):
|
|||
return data
|
||||
|
||||
def deserialize(self, data):
|
||||
qtutils.deserialize(data, self._history)
|
||||
try:
|
||||
qtutils.deserialize(data, self._history)
|
||||
except OSError:
|
||||
dump = "\n".join(
|
||||
bytes(line).hex(" ") for line in utils.chunk(bytes(data), 16)
|
||||
)
|
||||
log.webview.debug(f"Failed to deserialize history data:\n{dump}")
|
||||
raise
|
||||
|
||||
def _load_items_workaround(self, items):
|
||||
"""WORKAROUND for session loading not working on Qt 5.15.
|
||||
|
|
|
|||
Loading…
Reference in New Issue