Qt app crashes when adding a QMainWindow derived widget to a QMdiArea

Bug #1728652 reported by Darren Edale
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qt-sdk (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

In the course of developing an application I have discovered that adding a widget to an MDI area causes a segfault in QWindow::winId() when the widget added is derived from QMainWindow and is created using a compiled .ui file from QtDesigner. Creating a visually-identical UI but hand-coding the widget layout in C++ works as expected.

I have found this bug is reliable with Qt5.9.1 installed from the stock Kubuntu repositories. It occurs consistently on two different machines with this setup. The bug does not occur with Qt5.9.2 (installed directly from the Qt maintenance tool), and I've had it confirmed that it does *not* occur on Qt 5.9.2 64bit MSVC2013 Windows.

I have attached a sample stack trace. I have also created a very small example project on github that consistently produces the segfault on the setup I mentioned above. The github repo is here:

https://github.com/darrenedale/mdi-window-crash

I *think* the issue is in the libqt5widgets5 package but I can't be certain. I guess it's possible that it's an issue in the Breeze KDE theme or upstream in Qt?

lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10

Revision history for this message
Darren Edale (thebadcanary) wrote :
Revision history for this message
Darren Edale (thebadcanary) wrote :

I've researched the issue a bit more, based on the fact that the stack trace shows calls to KDEPlasmaPlatformTheme.so from within QMenuBar. So the issue is repeatable in the following circumstances:

- running on KDE Plasma
- having one (or more) Global Menu widgets in a panel or on the desktop
- having the setting "Application Style/Fine Tuning/Menubar Style" set to "Application Menu widget" in the KDE System Settings application.
- The QMainWindow being added to the MDI area has a menu bar.

It does *not* occur when the Plasma Global Menu widget is not in use (i.e. the setting "Application Style/Fine Tuning/Menubar Style" is set to something else.

My conclusion, therefore, is that I need to report this as an issue for KDE Plasma, so I'm closing this issue.

Changed in qt-sdk (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.