New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfaults with Qt 5.8 #2261
Comments
Just got one on exit with
If I'm not mistaken, that's here in // Remove myself from focus list
Q_ASSERT(d->focus_next->d_func()->focus_prev == this);
Q_ASSERT(d->focus_prev->d_func()->focus_next == this);
if (d->focus_next != this) {
d->focus_next->d_func()->focus_prev = d->focus_prev; // <-----
d->focus_prev->d_func()->focus_next = d->focus_next;
d->focus_next = d->focus_prev = 0;
} |
Looks like this always happens when closing a window... This helps, but probably introduces a memory leak: diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 6d46abbf8..c801c3cdf 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -279,7 +279,7 @@ class TabbedBrowser(tabwidget.TabWidget):
urlutils.invalid_url_error(tab.url(), "saving tab")
tab.shutdown()
self.removeTab(idx)
- tab.deleteLater()
+ # tab.deleteLater()
def undo(self):
"""Undo removing of a tab.""" |
This also helps for the window closing, but not for the tests: diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 6d46abbf8..0cdb5eff9 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -279,6 +279,7 @@ class TabbedBrowser(tabwidget.TabWidget):
urlutils.invalid_url_error(tab.url(), "saving tab")
tab.shutdown()
self.removeTab(idx)
+ tab.layout().unwrap()
tab.deleteLater()
def undo(self):
diff --git a/qutebrowser/misc/miscwidgets.py b/qutebrowser/misc/miscwidgets.py
index ba21e541a..5d5dff7c8 100644
--- a/qutebrowser/misc/miscwidgets.py
+++ b/qutebrowser/misc/miscwidgets.py
@@ -260,3 +260,6 @@ class WrapperLayout(QLayout):
self._widget = widget
container.setFocusProxy(widget)
widget.setParent(container)
+
+ def unwrap(self):
+ self._widget.setParent(None)
+ self._widget.deleteLater() pushing this as a temporary fix now. |
FYI, in case it's related, I was getting segfaults on every exit with backend=webengine with 5.8 and the qutebrowser package from archlinux's [community]. I don't get these segfaults with a new git build, so I didn't dig much deeper. This came up on the archlinux forums I spotted this issue while checking whether their were open issues on my lack of cookie saving problem (which I'll open an issue for momentarily if there are none yet). |
@TrilbyWhite yeah, that's probably because of the temporary fix in 90f472b. A probably unrelated one, when closing a tab:
|
The latter definitely is a Qt bug - reported as QTBUG-58563 and added a workaround in bb46c01 |
At least one segfault I saw during the tests is probably #1638 again - I disabled |
Should all be fixed now! |
Upstream bug for the first one: QTBUG-58982 |
Regarding the segfault, according to
|
This doesn't look related I think - there are many reasons why PyQt can segfault on exit. But thanks anyways! |
Qt 5.8 support was removed in April 2018 with 69a58c9, and the last crash report I got with Qt 5.8 was in the same month. The workaround removed in this commit still were around, and despite of what the version check says, they are *not* needed with Qt 5.7. Those were workarounds for the following bugs: - https://bugreports.qt.io/browse/QTBUG-58698 (#2290, 1af951f) - https://bugreports.qt.io/browse/QTBUG-58982 (#2261, 90f472b) See #3608
With Qt 5.8, there are various new weird segfaults when running the unittests...
The text was updated successfully, but these errors were encountered: