Bug 379719 - KDEPlasmaPlatformTheme causes a crash if an MDI Window with a menubar is created with the global menu enabled
Summary: KDEPlasmaPlatformTheme causes a crash if an MDI Window with a menubar is crea...
Status: RESOLVED FIXED
Alias: None
Product: plasma-integration
Classification: Plasma
Component: general (show other bugs)
Version: 5.9.5
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
: 376340 378788 400839 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-11 10:31 UTC by beojan
Modified: 2018-11-20 23:36 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12.7


Attachments
Sample backtrace (20.35 KB, text/plain)
2017-11-15 10:23 UTC, Darren Edale
Details
Sample backtrace with (almost) all debug symbols (26.76 KB, text/plain)
2017-11-17 10:33 UTC, Darren Edale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description beojan 2017-05-11 10:31:51 UTC
This manifests as System Settings crashing when the QtCurve config is opened:

```
Application: System Settings (systemsettings5), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fc9a18d9500 (LWP 19327))]

Thread 3 (Thread 0x7fc980ed8700 (LWP 19330)):
#0  0x00007fc99d5a867d in poll () from /usr/lib/libc.so.6
#1  0x00007fc9976989b6 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fc997698acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fc99decf09b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007fc99de788ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007fc99dc9aa73 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007fc99e7e6125 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x00007fc99dc9f6d8 in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007fc9995e02e7 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007fc99d5b254f in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fc98ebf1700 (LWP 19329)):
#0  0x00007fc99d5a867d in poll () from /usr/lib/libc.so.6
#1  0x00007fc999e648e0 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007fc999e66679 in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007fc991788239 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#4  0x00007fc99dc9f6d8 in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007fc9995e02e7 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007fc99d5b254f in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fc9a18d9500 (LWP 19327)):
[KCrash Handler]
#6  0x00007fc99f27b724 in QWindow::type() const () from /usr/lib/libQt5Gui.so.5
#7  0x00007fc99f280d92 in QWindow::winId() const () from /usr/lib/libQt5Gui.so.5
#8  0x00007fc98d7670a4 in ?? () from /usr/lib/qt/plugins/platformthemes/KDEPlasmaPlatformTheme.so
#9  0x00007fc98d7676fd in ?? () from /usr/lib/qt/plugins/platformthemes/KDEPlasmaPlatformTheme.so
#10 0x00007fc99fb87d2c in ?? () from /usr/lib/libQt5Widgets.so.5
#11 0x00007fc99fb88a05 in QMenuBar::eventFilter(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#12 0x00007fc99de7a1d1 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#13 0x00007fc99fa0b325 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007fc99fa12b61 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007fc99de7a470 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#16 0x00007fc99fa53e26 in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib/libQt5Widgets.so.5
#17 0x00007fc99fa54bbc in QWidget::setParent(QWidget*) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007fc99fa2e926 in QLayout::addChildWidget(QWidget*) () from /usr/lib/libQt5Widgets.so.5
#19 0x00007fc99fa2e99f in QLayout::addWidget(QWidget*) () from /usr/lib/libQt5Widgets.so.5
#20 0x00007fc99fb6e72c in QMdiSubWindow::setWidget(QWidget*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007fc99fb62853 in QMdiArea::addSubWindow(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007fc977023f4d in QtCurveConfig::previewControlPressed() () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#23 0x00007fc977024069 in QtCurveConfig::setupPreview() () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#24 0x00007fc97702f7b5 in QtCurveConfig::QtCurveConfig(QWidget*) () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#25 0x00007fc97702f851 in allocate_kstyle_config () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#26 0x00007fc9772acdaf in ?? () from /usr/lib/qt/plugins/kcm_style.so
#27 0x00007fc99dea60ee in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#28 0x00007fc99faf3d02 in QAbstractButton::clicked(bool) () from /usr/lib/libQt5Widgets.so.5
#29 0x00007fc99faf3f54 in ?? () from /usr/lib/libQt5Widgets.so.5
#30 0x00007fc99faf5347 in ?? () from /usr/lib/libQt5Widgets.so.5
#31 0x00007fc99faf5524 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQt5Widgets.so.5
#32 0x00007fc99fa52cd8 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#33 0x00007fc99fa0b34c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#34 0x00007fc99fa138c5 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#35 0x00007fc99de7a470 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#36 0x00007fc99fa120cd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQt5Widgets.so.5
#37 0x00007fc99fa6d3e6 in ?? () from /usr/lib/libQt5Widgets.so.5
#38 0x00007fc99fa6fe03 in ?? () from /usr/lib/libQt5Widgets.so.5
#39 0x00007fc99fa0b34c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#40 0x00007fc99fa12b61 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#41 0x00007fc99de7a470 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#42 0x00007fc99f276d53 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#43 0x00007fc99f2788c5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#44 0x00007fc99f25444b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#45 0x00007fc9917e89e0 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#46 0x00007fc9976987b7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#47 0x00007fc997698a20 in ?? () from /usr/lib/libglib-2.0.so.0
#48 0x00007fc997698acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#49 0x00007fc99decf07f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#50 0x00007fc99de788ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#51 0x00007fc99de80e14 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#52 0x000000000040c2b4 in ?? ()
#53 0x00007fc99d4e6511 in __libc_start_main () from /usr/lib/libc.so.6
#54 0x000000000040c33a in _start ()
```
Comment 1 Martin Flöser 2017-05-11 14:52:11 UTC
Unfortunately the backtrace is lacking debug symbols. We see it crashes, but not where. If you are able to reproduce, please install debug packages and attach an updated backtrace.
Comment 2 beojan 2017-05-11 15:19:11 UTC
(In reply to Martin Flöser from comment #1)
> Unfortunately the backtrace is lacking debug symbols. We see it crashes, but
> not where. If you are able to reproduce, please install debug packages and
> attach an updated backtrace.

Here:

Application: System Settings (systemsettings5), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f022482c7c0 (LWP 27861))]

Thread 3 (Thread 0x7f0203ba8700 (LWP 27864)):
#0  0x00007f02189191c9 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f02188d38b0 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f02188d3acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f0220e2010b in QEventDispatcherGlib::processEvents (this=0x7f01fc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f0220dc993a in QEventLoop::exec (this=this@entry=0x7f0203ba7dc0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007f0220bebae3 in QThread::exec (this=this@entry=0x7f02219aad60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507
#6  0x00007f0221736835 in QDBusConnectionManager::run (this=0x7f02219aad60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:170
#7  0x00007f0220bf0748 in QThreadPrivate::start (arg=0x7f02219aad60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#8  0x00007f021c5302e7 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007f022050154f in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f021193f700 (LWP 27863)):
#0  0x00007f02204f767d in poll () from /usr/lib/libc.so.6
#1  0x00007f021cdb48e0 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007f021cdb6679 in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007f02144d59f9 in QXcbEventReader::run (this=0x1dbc020) at qxcbconnection.cpp:1345
#4  0x00007f0220bf0748 in QThreadPrivate::start (arg=0x1dbc020) at thread/qthread_unix.cpp:368
#5  0x00007f021c5302e7 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007f022050154f in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f022482c7c0 (LWP 27861)):
[KCrash Handler]
#6  0x00007f02221cd764 in QFlags<Qt::WindowType>::operator& (f=<optimized out>, this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:142
#7  QWindow::type (this=this@entry=0x25d9840) at kernel/qwindow.cpp:826
#8  0x00007f02221d2dd2 in QWindow::winId (this=0x25d9840) at kernel/qwindow.cpp:599
#9  0x00007f02104b40a4 in ?? () from /usr/lib/qt/plugins/platformthemes/KDEPlasmaPlatformTheme.so
#10 0x00007f02104b46fd in ?? () from /usr/lib/qt/plugins/platformthemes/KDEPlasmaPlatformTheme.so
#11 0x00007f0222adedbc in QMenuBarPrivate::handleReparent (this=this@entry=0x25d9120) at widgets/qmenubar.cpp:1362
#12 0x00007f0222adfa95 in QMenuBar::eventFilter (this=0x25d6100, object=0x25bd730, event=0x7ffd09bd3a00) at widgets/qmenubar.cpp:1462
#13 0x00007f0220dcb241 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x25bd730, event=event@entry=0x7ffd09bd3a00) at kernel/qcoreapplication.cpp:1099
#14 0x00007f02229623b5 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x25bd730, e=0x7ffd09bd3a00) at kernel/qapplication.cpp:3741
#15 0x00007f0222969bf1 in QApplication::notify (this=0x7ffd09bd5bb0, receiver=0x25bd730, e=0x7ffd09bd3a00) at kernel/qapplication.cpp:3502
#16 0x00007f0220dcb4e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x25bd730, event=event@entry=0x7ffd09bd3a00) at kernel/qcoreapplication.cpp:988
#17 0x00007f02229aaeb6 in QCoreApplication::sendEvent (event=0x7ffd09bd3a00, receiver=0x25bd730) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#18 QWidget::setParent (this=this@entry=0x25bd730, parent=parent@entry=0x2624c20, f=...) at kernel/qwidget.cpp:10597
#19 0x00007f02229abc4c in QWidget::setParent (this=this@entry=0x25bd730, parent=parent@entry=0x2624c20) at kernel/qwidget.cpp:10451
#20 0x00007f02229859b6 in QLayout::addChildWidget (this=this@entry=0x2622c40, w=w@entry=0x25bd730) at kernel/qlayout.cpp:926
#21 0x00007f0222985a2f in QLayout::addWidget (this=0x2622c40, w=0x25bd730) at kernel/qlayout.cpp:226
#22 0x00007f0222ac57bc in QMdiSubWindow::setWidget (this=this@entry=0x2624c20, widget=widget@entry=0x25bd730) at widgets/qmdisubwindow.cpp:2330
#23 0x00007f0222ab98e3 in QMdiArea::addSubWindow (this=<optimized out>, widget=0x25bd730, windowFlags=...) at widgets/qmdiarea.cpp:1989
#24 0x00007f01f9cc3f4d in QtCurveConfig::previewControlPressed() () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#25 0x00007f01f9cc4069 in QtCurveConfig::setupPreview() () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#26 0x00007f01f9ccf7b5 in QtCurveConfig::QtCurveConfig(QWidget*) () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#27 0x00007f01f9ccf851 in allocate_kstyle_config () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#28 0x00007f01f9f4cdaf in ?? () from /usr/lib/qt/plugins/kcm_style.so
#29 0x00007f0220df715e in QtPrivate::QSlotObjectBase::call (a=0x7ffd09bd4de0, r=0x2243c60, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#30 QMetaObject::activate (sender=sender@entry=0x224bb00, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffd09bd4de0) at kernel/qobject.cpp:3723
#31 0x00007f0220df7707 in QMetaObject::activate (sender=sender@entry=0x224bb00, m=m@entry=0x7f022303e3e0 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffd09bd4de0) at kernel/qobject.cpp:3602
#32 0x00007f0222a4ad92 in QAbstractButton::clicked (this=this@entry=0x224bb00, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:309
#33 0x00007f0222a4afe4 in QAbstractButtonPrivate::emitClicked (this=0x224bc30) at widgets/qabstractbutton.cpp:411
#34 0x00007f0222a4c3d7 in QAbstractButtonPrivate::click (this=0x224bc30) at widgets/qabstractbutton.cpp:404
#35 0x00007f0222a4c5b4 in QAbstractButton::mouseReleaseEvent (this=0x224bb00, e=0x7ffd09bd52c0) at widgets/qabstractbutton.cpp:1009
#36 0x00007f02229a9d68 in QWidget::event (this=0x224bb00, event=0x7ffd09bd52c0) at kernel/qwidget.cpp:9156
#37 0x00007f02229623dc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x224bb00, e=0x7ffd09bd52c0) at kernel/qapplication.cpp:3745
#38 0x00007f022296a955 in QApplication::notify (this=<optimized out>, receiver=0x224bb00, e=0x7ffd09bd52c0) at kernel/qapplication.cpp:3219
#39 0x00007f0220dcb4e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x224bb00, event=event@entry=0x7ffd09bd52c0) at kernel/qcoreapplication.cpp:988
#40 0x00007f022296915d in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#41 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x224bb00, event=event@entry=0x7ffd09bd52c0, alienWidget=alienWidget@entry=0x224bb00, nativeWidget=0x1ebeae0, buttonDown=buttonDown@entry=0x7f0223068810 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2715
#42 0x00007f02229c4476 in QWidgetWindow::handleMouseEvent (this=this@entry=0x1e93330, event=event@entry=0x7ffd09bd56e0) at kernel/qwidgetwindow.cpp:617
#43 0x00007f02229c6e93 in QWidgetWindow::event (this=0x1e93330, event=0x7ffd09bd56e0) at kernel/qwidgetwindow.cpp:239
#44 0x00007f02229623dc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1e93330, e=0x7ffd09bd56e0) at kernel/qapplication.cpp:3745
#45 0x00007f0222969bf1 in QApplication::notify (this=0x7ffd09bd5bb0, receiver=0x1e93330, e=0x7ffd09bd56e0) at kernel/qapplication.cpp:3502
#46 0x00007f0220dcb4e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x1e93330, event=event@entry=0x7ffd09bd56e0) at kernel/qcoreapplication.cpp:988
#47 0x00007f02221c8d93 in QCoreApplication::sendSpontaneousEvent (event=0x7ffd09bd56e0, receiver=0x1e93330) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#48 QGuiApplicationPrivate::processMouseEvent (e=0x22860d0) at kernel/qguiapplication.cpp:1927
#49 0x00007f02221ca905 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x22860d0) at kernel/qguiapplication.cpp:1711
#50 0x00007f02221a648b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:710
#51 0x00007f02145361a0 in userEventSourceDispatch (source=<optimized out>) at qeventdispatcher_glib.cpp:76
#52 0x00007f02188d37b7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#53 0x00007f02188d3a20 in ?? () from /usr/lib/libglib-2.0.so.0
#54 0x00007f02188d3acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#55 0x00007f0220e200ef in QEventDispatcherGlib::processEvents (this=0x1df9310, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#56 0x00007f0220dc993a in QEventLoop::exec (this=this@entry=0x7ffd09bd5a90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#57 0x00007f0220dd1e84 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#58 0x000000000040c2b4 in ?? ()
#59 0x00007f0220435511 in __libc_start_main () from /usr/lib/libc.so.6
#60 0x000000000040c33a in _start ()

There's still no debug information in KDEPlasmaPlatformTheme, but I built it in the debug configuration so I don't know why that is.
Comment 3 Martin Flöser 2017-05-11 15:35:34 UTC
> There's still no debug information in KDEPlasmaPlatformTheme, but I built it in the debug configuration so I don't know why that is.

That would be the interesting part unfortunately. It's the only part in our code.
Comment 4 beojan 2017-05-11 16:10:35 UTC
(In reply to Martin Flöser from comment #3)
> > There's still no debug information in KDEPlasmaPlatformTheme, but I built it in the debug configuration so I don't know why that is.
> 
> That would be the interesting part unfortunately. It's the only part in our
> code.

Can you give me instructions on how to build it with debug symbols? Setting CMAKE_BUILD_TYPE to Debug is apparently not enough.
Comment 5 Martin Flöser 2017-05-11 16:29:12 UTC
I'm sorry, as I do not know your distribution and do not know how exactly you are building I cannot provide any help.
Comment 6 beojan 2017-05-11 17:13:23 UTC
(In reply to Martin Flöser from comment #5)
> I'm sorry, as I do not know your distribution and do not know how exactly
> you are building I cannot provide any help.

I'm literally building from the plasma-integration tarball with CMake.
Comment 7 beojan 2017-05-15 12:34:42 UTC
Here's the new backtrace with debug symbols enabled:

Application: System Settings (systemsettings5), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fcd1fa627c0 (LWP 26324))]

Thread 3 (Thread 0x7fccfe73a700 (LWP 26327)):
#0  0x00007fcd1b72937d in read () from /usr/lib/libc.so.6
#1  0x00007fcd13b4de20 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fcd13b0947e in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x00007fcd13b09954 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007fcd13b09acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007fcd1c05610b in QEventDispatcherGlib::processEvents (this=0x7fccf80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#6  0x00007fcd1bfff93a in QEventLoop::exec (this=this@entry=0x7fccfe739dc0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#7  0x00007fcd1be21ae3 in QThread::exec (this=this@entry=0x7fcd1cbe0d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507
#8  0x00007fcd1c96c835 in QDBusConnectionManager::run (this=0x7fcd1cbe0d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:170
#9  0x00007fcd1be26748 in QThreadPrivate::start (arg=0x7fcd1cbe0d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#10 0x00007fcd177662e7 in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007fcd1b73754f in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fcd0cb75700 (LWP 26326)):
#0  0x00007fcd1b72d67d in poll () from /usr/lib/libc.so.6
#1  0x00007fcd17fea8e0 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007fcd17fec679 in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007fcd0f70b9f9 in QXcbEventReader::run (this=0x12bb020) at qxcbconnection.cpp:1345
#4  0x00007fcd1be26748 in QThreadPrivate::start (arg=0x12bb020) at thread/qthread_unix.cpp:368
#5  0x00007fcd177662e7 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007fcd1b73754f in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fcd1fa627c0 (LWP 26324)):
[KCrash Handler]
#6  0x00007fcd1d403764 in QFlags<Qt::WindowType>::operator& (f=<optimized out>, this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:142
#7  QWindow::type (this=this@entry=0x1ad92e0) at kernel/qwindow.cpp:826
#8  0x00007fcd1d408dd2 in QWindow::winId (this=0x1ad92e0) at kernel/qwindow.cpp:599
#9  0x00007fcd0756dfd3 in QDBusMenuBar::unregisterMenuBar (this=0x1ad8f00) at /home/beojan/SRC/ABS/extra/plasma-integration/src/plasma-integration-5.9.5/src/platformtheme/qdbusmenubar.cpp:222
#10 0x00007fcd0756d989 in QDBusMenuBar::handleReparent (this=0x1ad8f00, newParentWindow=0x17c6df0) at /home/beojan/SRC/ABS/extra/plasma-integration/src/plasma-integration-5.9.5/src/platformtheme/qdbusmenubar.cpp:171
#11 0x00007fcd1dd14dbc in QMenuBarPrivate::handleReparent (this=this@entry=0x1ad8b00) at widgets/qmenubar.cpp:1362
#12 0x00007fcd1dd15a95 in QMenuBar::eventFilter (this=0x1ad87f0, object=0x1abdf70, event=0x7fffd5e18b00) at widgets/qmenubar.cpp:1462
#13 0x00007fcd1c001241 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x1abdf70, event=event@entry=0x7fffd5e18b00) at kernel/qcoreapplication.cpp:1099
#14 0x00007fcd1db983b5 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1abdf70, e=0x7fffd5e18b00) at kernel/qapplication.cpp:3741
#15 0x00007fcd1db9fbf1 in QApplication::notify (this=0x7fffd5e1acb0, receiver=0x1abdf70, e=0x7fffd5e18b00) at kernel/qapplication.cpp:3502
#16 0x00007fcd1c0014e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x1abdf70, event=event@entry=0x7fffd5e18b00) at kernel/qcoreapplication.cpp:988
#17 0x00007fcd1dbe0eb6 in QCoreApplication::sendEvent (event=0x7fffd5e18b00, receiver=0x1abdf70) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#18 QWidget::setParent (this=this@entry=0x1abdf70, parent=parent@entry=0x1b21cb0, f=...) at kernel/qwidget.cpp:10597
#19 0x00007fcd1dbe1c4c in QWidget::setParent (this=this@entry=0x1abdf70, parent=parent@entry=0x1b21cb0) at kernel/qwidget.cpp:10451
#20 0x00007fcd1dbbb9b6 in QLayout::addChildWidget (this=this@entry=0x1b195e0, w=w@entry=0x1abdf70) at kernel/qlayout.cpp:926
#21 0x00007fcd1dbbba2f in QLayout::addWidget (this=0x1b195e0, w=0x1abdf70) at kernel/qlayout.cpp:226
#22 0x00007fcd1dcfb7bc in QMdiSubWindow::setWidget (this=this@entry=0x1b21cb0, widget=widget@entry=0x1abdf70) at widgets/qmdisubwindow.cpp:2330
#23 0x00007fcd1dcef8e3 in QMdiArea::addSubWindow (this=<optimized out>, widget=0x1abdf70, windowFlags=...) at widgets/qmdiarea.cpp:1989
#24 0x00007fccf487af4d in QtCurveConfig::previewControlPressed() () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#25 0x00007fccf487b069 in QtCurveConfig::setupPreview() () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#26 0x00007fccf48867b5 in QtCurveConfig::QtCurveConfig(QWidget*) () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#27 0x00007fccf4886851 in allocate_kstyle_config () from /usr/lib/qt/plugins/kstyle_qtcurve5_config.so
#28 0x00007fccf4b03daf in ?? () from /usr/lib/qt/plugins/kcm_style.so
#29 0x00007fcd1c02d15e in QtPrivate::QSlotObjectBase::call (a=0x7fffd5e19ee0, r=0x1741e30, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#30 QMetaObject::activate (sender=sender@entry=0x1749cd0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffd5e19ee0) at kernel/qobject.cpp:3723
#31 0x00007fcd1c02d707 in QMetaObject::activate (sender=sender@entry=0x1749cd0, m=m@entry=0x7fcd1e2743e0 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffd5e19ee0) at kernel/qobject.cpp:3602
#32 0x00007fcd1dc80d92 in QAbstractButton::clicked (this=this@entry=0x1749cd0, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:309
#33 0x00007fcd1dc80fe4 in QAbstractButtonPrivate::emitClicked (this=0x1749e00) at widgets/qabstractbutton.cpp:411
#34 0x00007fcd1dc823d7 in QAbstractButtonPrivate::click (this=0x1749e00) at widgets/qabstractbutton.cpp:404
#35 0x00007fcd1dc825b4 in QAbstractButton::mouseReleaseEvent (this=0x1749cd0, e=0x7fffd5e1a3c0) at widgets/qabstractbutton.cpp:1009
#36 0x00007fcd1dbdfd68 in QWidget::event (this=0x1749cd0, event=0x7fffd5e1a3c0) at kernel/qwidget.cpp:9156
#37 0x00007fcd1db983dc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1749cd0, e=0x7fffd5e1a3c0) at kernel/qapplication.cpp:3745
#38 0x00007fcd1dba0955 in QApplication::notify (this=<optimized out>, receiver=0x1749cd0, e=0x7fffd5e1a3c0) at kernel/qapplication.cpp:3219
#39 0x00007fcd1c0014e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x1749cd0, event=event@entry=0x7fffd5e1a3c0) at kernel/qcoreapplication.cpp:988
#40 0x00007fcd1db9f15d in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#41 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x1749cd0, event=event@entry=0x7fffd5e1a3c0, alienWidget=alienWidget@entry=0x1749cd0, nativeWidget=0x1391ba0, buttonDown=buttonDown@entry=0x7fcd1e29e810 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2715
#42 0x00007fcd1dbfa476 in QWidgetWindow::handleMouseEvent (this=this@entry=0x14605c0, event=event@entry=0x7fffd5e1a7e0) at kernel/qwidgetwindow.cpp:617
#43 0x00007fcd1dbfce93 in QWidgetWindow::event (this=0x14605c0, event=0x7fffd5e1a7e0) at kernel/qwidgetwindow.cpp:239
#44 0x00007fcd1db983dc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x14605c0, e=0x7fffd5e1a7e0) at kernel/qapplication.cpp:3745
#45 0x00007fcd1db9fbf1 in QApplication::notify (this=0x7fffd5e1acb0, receiver=0x14605c0, e=0x7fffd5e1a7e0) at kernel/qapplication.cpp:3502
#46 0x00007fcd1c0014e0 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x14605c0, event=event@entry=0x7fffd5e1a7e0) at kernel/qcoreapplication.cpp:988
#47 0x00007fcd1d3fed93 in QCoreApplication::sendSpontaneousEvent (event=0x7fffd5e1a7e0, receiver=0x14605c0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#48 QGuiApplicationPrivate::processMouseEvent (e=0x1785d30) at kernel/qguiapplication.cpp:1927
#49 0x00007fcd1d400905 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x1785d30) at kernel/qguiapplication.cpp:1711
#50 0x00007fcd1d3dc48b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:710
#51 0x00007fcd0f76c1a0 in userEventSourceDispatch (source=<optimized out>) at qeventdispatcher_glib.cpp:76
#52 0x00007fcd13b097b7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#53 0x00007fcd13b09a20 in ?? () from /usr/lib/libglib-2.0.so.0
#54 0x00007fcd13b09acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#55 0x00007fcd1c0560ef in QEventDispatcherGlib::processEvents (this=0x1300770, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#56 0x00007fcd1bfff93a in QEventLoop::exec (this=this@entry=0x7fffd5e1ab90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#57 0x00007fcd1c007e84 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#58 0x000000000040c2b4 in ?? ()
#59 0x00007fcd1b66b511 in __libc_start_main () from /usr/lib/libc.so.6
#60 0x000000000040c33a in _start ()
Comment 8 beojan 2017-05-17 09:29:31 UTC
*** Bug 378788 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2017-05-29 23:36:43 UTC
Investigation from bug 376340 comment #5 suggests it could be a bug in QtCurve.
Comment 10 beojan 2017-05-29 23:39:10 UTC
My guess is there are multiple bugs here.
Comment 11 Darren Edale 2017-11-15 10:23:23 UTC
Created attachment 108875 [details]
Sample backtrace

Thread 1 is the thread of interest. The two calls into KDEPlasmaPlatformTheme.so are missing debug symbols. I'm running Kubuntu Artful (17.10) with backports enabled, so Plasma 5.11.3, Frameworks 5.39.0, Qt 5.9.1. Unfortunately I can't find any packages with debug symbols for the backported packages, which includes KDEPlasmaPlatformTheme.so. When I get a chance I try to replicate with vanilla Kubuntu Artful and the debug symbols installed so that the stack trace identifies the calls in KDEPlasmaPlatformTheme.so.
Comment 12 Darren Edale 2017-11-15 10:27:32 UTC
I can confirm this issue, and have attached a backtrace. See the comments attached to the trace for a bit more detail. This manifests as a crash in an app I am developing when a QMainWindow with a menu is added to an MDI area and the Plasma Global Menu widget is being used. The Plasma theme in use is Breeze.

I have created a simple test application on GitHub that reliably triggers this issue:

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

Hope this helps.
Comment 13 Darren Edale 2017-11-15 10:41:03 UTC
Seems I messed up adding comments to my previously-attached backtrace. So, some more details:

Kubuntu 17.10
Plasma 5.11.3
Frameworks 5.39.0
Qt 5.9.1
Breeze theme.

KDE/Plasma installed from backports PPA, which does not provide debug symbols AFAICT. If/when I get time, I will fire up a VM with vanilla Kubuntu 17.10 and all the relevant debug symbols installed, and provide an updated backtrace (assuming the bug still manifests!)
Comment 14 Darren Edale 2017-11-17 10:33:46 UTC
Created attachment 108912 [details]
Sample backtrace with (almost) all debug symbols

This is a backtrace from running the same code as for the old backtrace it obsoletes, with additional debug symbols available. I hope this helps.
Comment 15 Christoph Feck 2017-11-29 03:12:53 UTC
Comment #12 and comment #14 look useful. If I understand it correctly, the Plasma global menu code gets confused if a main window has a menu bar, and its child MDI window _also_ has a menu bar. Correct?

The first question (ignoring the crash for now) would be to understand how this should work at all. Merging (i.e. mixing) the menus is probably impossible, and concatenating them might be possible, but still dangerous. Or ignore the main window's menu if a subwindow has a menu? Questions ...

Can you confirm the QtCurve settings dialog tries to show an MDI window with a menubar?
Comment 16 beojan 2017-11-29 09:34:08 UTC
Yes, the QtCurve settings dialog is definitely doing this (specifically, it has an MDI preview window which has a menu).

The easiest solution would be to leave MDI child window menus in the child window. Perhaps they could be moved to the global menu iff the parent window has no menu of its own, but I wouldn't try to combine the two menus.
Comment 17 Darren Edale 2017-11-29 10:49:00 UTC
(In reply to beojan from comment #16)
> Yes, the QtCurve settings dialog is definitely doing this (specifically, it
> has an MDI preview window which has a menu).
> 
> The easiest solution would be to leave MDI child window menus in the child
> window. Perhaps they could be moved to the global menu iff the parent window
> has no menu of its own, but I wouldn't try to combine the two menus.

FWIW, I also think this is probably the best solution. The global menu won't be confused by having two different menus in it at once, and my guess would be that this would also be the least complex to implement.
Comment 18 Christoph Feck 2017-11-29 20:57:30 UTC
I only had a cursory look at the relevant sources, and from what I understand, it could be a bug in Qt.

Qt documentation says: "If you have multiple menu bars in one dialog the outermost menu bar (normally inside a widget with widget flag Qt::Window) will be used for the system-wide menu bar."

This check seems to fail if an MDI window in a window is used.
Comment 19 Roman Bysh 2018-03-26 20:43:52 UTC
Update Please

Is there a patch in the pipeline? It's still crashing in Plasma 5.12.3.
Comment 20 Kai Uwe Broulik 2018-06-28 09:57:00 UTC
Git commit 73eeda3a7dfb3b155a6198ff733e5ab2f1a89f0e by Kai Uwe Broulik.
Committed on 28/06/2018 at 09:56.
Pushed by broulik into branch 'Plasma/5.12'.

[QDBusMenuBar] Guard m_window with a QPointer

It can be deleted without us knowing for MDI windows as happens in QtCurve config.
Also always update m_window if it changes, even when null.
Related: bug 376340
FIXED-IN: 5.12.7

Differential Revision: https://phabricator.kde.org/D13774

M  +11   -6    src/platformtheme/qdbusmenubar.cpp
M  +1    -1    src/platformtheme/qdbusmenubar_p.h

https://commits.kde.org/plasma-integration/73eeda3a7dfb3b155a6198ff733e5ab2f1a89f0e
Comment 21 Christoph Feck 2018-07-06 14:42:09 UTC
*** Bug 376340 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Feck 2018-11-20 23:36:17 UTC
*** Bug 400839 has been marked as a duplicate of this bug. ***