Summary: | Plasma crash under Wayland when I unplugged second monitor | ||
---|---|---|---|
Product: | [Plasma] KScreen | Reporter: | Francisco Cribari <cribari> |
Component: | libkscreen | Assignee: | kscreen-bugs-null <kscreen-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ap, bugseforuns, daniel, kampfkartoffel, kde, kde, meven29, mike.rudenko, pascal, plasma-bugs |
Priority: | NOR | Keywords: | drkonqi, wayland |
Version: | 5.17.2 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/libkscreen/63cab28e74ee30706cc43958921ae4224e4ea1fc | Version Fixed In: | 5.18.2 |
Sentry Crash Report: |
Description
Francisco Cribari
2019-11-06 21:57:34 UTC
Reproduced with : Operating System: Kubuntu 19.10 KDE Plasma Version: 5.17.2 KDE Frameworks Version: 5.62.0 Qt Version: 5.12.4 *** Bug 413832 has been marked as a duplicate of this bug. *** *** Bug 416455 has been marked as a duplicate of this bug. *** *** Bug 417380 has been marked as a duplicate of this bug. *** *** Bug 417864 has been marked as a duplicate of this bug. *** Copying better stack trace from duplicate https://bugs.kde.org/show_bug.cgi?id=417864: Thread 1 (Thread 0x7f6411926800 (LWP 7501)): [KCrash Handler] #6 0x00007f63ffd89564 in KWayland::Client::OutputDevice::enabled (this=0x560bc9a8fd30) at ./src/client/outputdevice.cpp:535 #7 0x00007f63d3df5566 in KScreen::WaylandOutput::updateKScreenOutput (this=this@entry=0x560bd9240f00, output=...) at ./backends/kwayland/waylandoutput.cpp:102 #8 0x00007f63d3df67fc in KScreen::WaylandOutput::toKScreenOutput (this=0x560bd9240f00) at ./backends/kwayland/waylandoutput.cpp:94 #9 0x00007f63d3dede0e in KScreen::WaylandConfig::currentConfig (this=0x560bd91bbfe0) at ./backends/kwayland/waylandconfig.cpp:294 #10 0x00007f63d3debcb3 in KScreen::WaylandBackend::<lambda()>::operator() (__closure=<optimized out>) at ./backends/kwayland/waylandbackend.cpp:45 #11 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KScreen::WaylandBackend::WaylandBackend()::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146 #12 QtPrivate::Functor<KScreen::WaylandBackend::WaylandBackend()::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256 #13 QtPrivate::QFunctorSlotObject<KScreen::WaylandBackend::WaylandBackend()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:439 #14 0x00007f640d79391f in QtPrivate::QSlotObjectBase::call (a=0x7fff51f2c8c0, r=0x560bd926d010, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394 #15 QMetaObject::activate (sender=sender@entry=0x560bd91bbfe0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=<optimized out>, argv@entry=0x0) at kernel/qobject.cpp:3789 #16 0x00007f640d793ec7 in QMetaObject::activate (sender=sender@entry=0x560bd91bbfe0, m=m@entry=0x7f63d3ffec80 <KScreen::WaylandConfig::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3660 #17 0x00007f63d3dfb050 in KScreen::WaylandConfig::configChanged (this=this@entry=0x560bd91bbfe0) at ./obj-x86_64-linux-gnu/backends/kwayland/KSC_KWayland_autogen/EWIEGA46WW/moc_waylandconfig.cpp:143 #18 0x00007f63d3df208c in KScreen::WaylandConfig::removeOutput (this=0x560bd91bbfe0, output=<optimized out>) at ./backends/kwayland/waylandconfig.cpp:253 #19 0x00007f640d79391f in QtPrivate::QSlotObjectBase::call (a=0x7fff51f2ca20, r=0x560bd91bbfe0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394 #20 QMetaObject::activate (sender=0x560bd9240f00, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3789 #21 0x00007f640d79391f in QtPrivate::QSlotObjectBase::call (a=0x7fff51f2cb20, r=0x560bd9240f00, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394 #22 QMetaObject::activate (sender=0x560bd91c82a0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3789 #23 0x00007f640d79391f in QtPrivate::QSlotObjectBase::call (a=0x7fff51f2cc80, r=0x560bd91c82a0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394 #24 QMetaObject::activate (sender=0x560bd9138a00, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=77, argv=<optimized out>, argv@entry=0x7fff51f2cc80) at kernel/qobject.cpp:3789 #25 0x00007f640d793ec7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f6400003360 <KWayland::Client::Registry::staticMetaObject>, local_signal_index=local_signal_index@entry=77, argv=argv@entry=0x7fff51f2cc80) at kernel/qobject.cpp:3660 #26 0x00007f63ffdbff81 in KWayland::Client::Registry::interfaceRemoved (this=<optimized out>, _t1=<optimized out>) at ./obj-x86_64-linux-gnu/src/client/KF5WaylandClient_autogen/EWIEGA46WW/moc_registry.cpp:1597 It seems that in KScreen : void WaylandConfig::removeOutput(WaylandOutput *output) { if (m_initializingOutputs.removeOne(output)) { // output was not yet fully initialized, just remove here and return delete output; return; } // remove the output from output mapping Q_ASSERT(m_outputMap.take(output->id()) == output); m_screen->setOutputs(m_outputMap.values()); delete output; if (!m_blockSignals) { Q_EMIT configChanged(); } } Somehow does not remove the output from m_outputMap causing down the line a classic null pointer segfault. Could output be nullpointer ? The issue could be in WaylandConfig::addOutput and how the WaylandOutput is set up : void WaylandConfig::addOutput(quint32 name, quint32 version) { WaylandOutput *waylandoutput = new WaylandOutput(++s_outputId, this); m_initializingOutputs << waylandoutput; connect(waylandoutput, &WaylandOutput::deviceRemoved, this, [this, waylandoutput]() { removeOutput(waylandoutput); }); waylandoutput->createOutputDevice(m_registry, name, version); // finalize: when the output is done, we put it in the known outputs map, // remove if from the list of initializing outputs, and emit configChanged() connect(waylandoutput, &WaylandOutput::complete, this, [this, waylandoutput]{ m_outputMap.insert(waylandoutput->id(), waylandoutput); m_initializingOutputs.removeOne(waylandoutput); checkInitialized(); if (!m_blockSignals && m_initializingOutputs.empty()) { m_screen->setOutputs(m_outputMap.values()); Q_EMIT configChanged(); } connect(waylandoutput, &WaylandOutput::changed, this, [this]() { if (!m_blockSignals) { Q_EMIT configChanged(); } }); }); } D27536 Git commit 63cab28e74ee30706cc43958921ae4224e4ea1fc by Daniel Vrátil. Committed on 21/02/2020 at 11:51. Pushed by dvratil into branch 'Plasma/5.18'. fix(kwayland): remove code with side-effects from Q_ASSERT Summary: FIXED-IN: 5.18.2 Reviewers: #plasma, davidedmundson, meven Reviewed By: #plasma, davidedmundson, meven Subscribers: meven, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D27536 M +2 -1 backends/kwayland/waylandconfig.cpp https://commits.kde.org/libkscreen/63cab28e74ee30706cc43958921ae4224e4ea1fc *** Bug 415240 has been marked as a duplicate of this bug. *** |