Hi devs,
Qt 6.9.1 has a bug that causes segfaults when closing a program using QDockWidgets under some circumstances, cf. https://bugreports.qt.io/browse/QTBUG-137755.
Fortunately, this has been fixed quite fast, and it will be released with 6.9.2, somewhere towards end of August.
However, until then, and until it will be included and stabilized by you, we'll have to live with segfaults when closing a program where the bug hits.
So -- would you consider to add the backported patch to a -r1 release? I filed a Gentoo bug report asking for the same, including all necessary patches at https://bugs.gentoo.org/959225 (cf. https://forum.qt.io/post/827848)
Thanks for taking this into account!
Cheers, Tobias
Hi Tobias,
Thx for reporting and the additional work. I will have a look.
artist
An updated version is now available for testing in the world-gremlins repository.
artist
Thanks for the quick follow-up :-)
Pkg qt6-base is being moved to stable/world now.
artist
I can confirm that qt6-base-6.9.1-2.1 which I just installed includes the patch correctly, I don't see the crash anymore. Thanks a lot for the fast inclusion of the backport – this was really annoying!
The patch seems to be gone again? With world/qt6-base 6.9.1-4, the segfaults are there again …
Hopefully, they release 6.9.2 soon, I think it will be included there …
Arch added patches twice which seemed to replace our ones, but not all it seems,
I'll see if I can diff it out and merge.
artist
Thanks :-) If you're at it anyway, maybe you want to add two other patches for another crash (QTBUG-138201) and some really annoying rendering bug (QTBUG-133845)?
These would be the patches:
From 2c8692adaed1c3374ca01842e166af79ed3861cc Mon Sep 17 00:00:00 2001
From: Axel Spoerl <[email protected]>
Date: Thu, 3 Jul 2025 07:35:37 +0200
Subject: [PATCH] QMainWindowLayout::animationFinished(): don't show deleted
tab bars
QMainWindowLayout::animationFinished(): looped over a copy of the
usedTabBars member and showed all tab bars in the container.
Showing a tab bar, can cause another in the container to become unused.
Unused tab bars were kept in a separate container and re-used, before
a3f0ce4c0d0627ef979052b34b21e6fd2bdc3acf changed this logic and deleted
unused tab bars.
This caused a regression: show() was called on a deleted tab bar,
causing a crash.
Only show tab bars from the copied container, if usedTabBars still
contains them.
Fixes: QTBUG-138201
Pick-to: 6.10 6.9
Change-Id: I33de57ab3276d1f786d27f63aebfe8ba8ddc2832
Reviewed-by: Samuel Gaist <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
---
src/widgets/widgets/qmainwindowlayout.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 87c33932a8d..a1a4cfc2ce0 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -2673,8 +2673,10 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
#if QT_CONFIG(tabbar)
const auto usedTabBarsCopy = usedTabBars; // list potentially modified by animations
- for (QTabBar *tab_bar : usedTabBarsCopy)
- tab_bar->show();
+ for (QTabBar *tab_bar : usedTabBarsCopy) {
+ if (usedTabBars.contains(tab_bar)) // Showing a tab bar can cause another to be deleted.
+ tab_bar->show();
+ }
#endif // QT_CONFIG(tabbar)
#endif // QT_CONFIG(dockwidget)
}
--
2.49.0
and
From 877d352e490fc80b87dc76b53f4877fbd91c1b08 Mon Sep 17 00:00:00 2001
From: Christian Ehrlicher <[email protected]>
Date: Fri, 11 Jul 2025 08:34:50 +0200
Subject: [PATCH] QStyleSheetStyle: Don't calc size for CT_SpinBox when not
handled
The default stylesheet for CT_SpinBox defines a native border which was
added to the sizeHint even though it was already added by the base
style.
Amends 96adebed606cdbc73c73778917d777dc04c6e93e.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-133845
Task-number: QTBUG-130642
Task-number: QTBUG-132431
Change-Id: I2332c4f027a8f4cceb477ae239c348509e6e7356
Reviewed-by: Volker Hilsheimer <[email protected]>
---
src/widgets/styles/qstylesheetstyle.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 08178e7b685..f4b21d3b70d 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -5269,7 +5269,11 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
if (rule.baseStyleCanDraw()) {
sz = baseStyle()->sizeFromContents(ct, opt, sz, w);
- } else if (spinbox->buttonSymbols != QAbstractSpinBox::NoButtons) {
+ if (rule.hasBox() || !rule.hasNativeBorder())
+ sz = rule.boxSize(sz);
+ return sz;
+ }
+ if (spinbox->buttonSymbols != QAbstractSpinBox::NoButtons) {
// Add some space for the up/down buttons
QRenderRule subRule = renderRule(w, opt, PseudoElement_SpinBoxUpButton);
if (subRule.hasDrawable()) {
--
2.49.1
(I filed all of the bugs, so I know these ;-)
I already pushed a build to gremlins but will also have a look a these 2 patches.
artist
Updated once more.
artist
Thanks :-)
Hopefully, future version will be more stable, as 5.15 was back then™