Bug 413892

Summary: Plasma crash under Wayland when I unplugged second monitor
Product: [Plasma] KScreen Reporter: Francisco Cribari <cribari>
Component: libkscreenAssignee: 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: Version Fixed In: 5.18.2
Sentry Crash Report:

Description Francisco Cribari 2019-11-06 21:57:34 UTC
Application: plasmashell (5.17.2)

Qt Version: 5.13.2
Frameworks Version: 5.63.0
Operating System: Linux 5.3.8-zen1-1-zen x86_64
Distribution: Arch Linux

-- Information about the crash:
- What I was doing when the application crashed:

Plasma crashed when I unplugged a HDMI projection (second monitor). Plugged the projector and all went well. When I unplugged it Plasma crashed. 

- Unusual behavior I noticed:

Plasma crash. 

- Custom settings of the application:

No custom settings.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fb00c37ac80 (LWP 11176))]

Thread 12 (Thread 0x7fafe21e0700 (LWP 11545)):
#0  0x00007fb0104bbc45 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fb010fca610 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/libQt5Core.so.5
#2  0x00007fb010fca702 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#3  0x00007fb012c50e3d in  () at /usr/lib/libQt5Quick.so.5
#4  0x00007fb012c510ee in  () at /usr/lib/libQt5Quick.so.5
#5  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#6  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 11 (Thread 0x7fafcb7fe700 (LWP 11462)):
#0  0x00007fb0104bbc45 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fb010fca610 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/libQt5Core.so.5
#2  0x00007fb010fca702 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#3  0x00007fb012c50e3d in  () at /usr/lib/libQt5Quick.so.5
#4  0x00007fb012c510ee in  () at /usr/lib/libQt5Quick.so.5
#5  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#6  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7fafcbfff700 (LWP 11441)):
#0  0x00007fb00f2d94e4 in g_mutex_unlock () at /usr/lib/libglib-2.0.so.0
#1  0x00007fb00f329088 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fb00f329241 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fb0111eab2c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007fb010fc3305 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7fafe19df700 (LWP 11422)):
#0  0x00007fb0104bbc45 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fb010fca610 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/libQt5Core.so.5
#2  0x00007fb010fca702 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#3  0x00007fb012c50e3d in  () at /usr/lib/libQt5Quick.so.5
#4  0x00007fb012c510ee in  () at /usr/lib/libQt5Quick.so.5
#5  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#6  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7faff4c8d700 (LWP 11419)):
#0  0x00007fb00f326dbb in  () at /usr/lib/libglib-2.0.so.0
#1  0x00007fb00f3276cc in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fb00f32898b in g_main_context_prepare () at /usr/lib/libglib-2.0.so.0
#3  0x00007fb00f329096 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007fb00f329241 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007fb0111eab2c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007fb010fc3305 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7fafe34e7700 (LWP 11382)):
#0  0x00007fb00f32067f in g_source_ref () at /usr/lib/libglib-2.0.so.0
#1  0x00007fb00f3276b2 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fb00f32782f in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007fb00f329118 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007fb00f329241 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007fb0111eab2c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007fb010fc3305 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007fafe3ef813b in KCupsConnection::run() () at /usr/lib/libkcupslib.so
#9  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7faff640d700 (LWP 11321)):
#0  0x00007fb0104bbc45 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fb010fca610 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/libQt5Core.so.5
#2  0x00007fb010fca702 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#3  0x00007fb012c50e3d in  () at /usr/lib/libQt5Quick.so.5
#4  0x00007fb012c510ee in  () at /usr/lib/libQt5Quick.so.5
#5  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#6  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7faff6c0e700 (LWP 11320)):
#0  0x00007fb00f2d94e4 in g_mutex_unlock () at /usr/lib/libglib-2.0.so.0
#1  0x00007fb00f32924d in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#2  0x00007fb0111eab2c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007fb010fc3305 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#5  0x00007fb012bc570b in  () at /usr/lib/libQt5Quick.so.5
#6  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7fb003fff700 (LWP 11251)):
#0  0x00007fb0104bbc45 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007fb00882c5ac in  () at /usr/lib/dri/i965_dri.so
#2  0x00007fb00882c1a8 in  () at /usr/lib/dri/i965_dri.so
#3  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fb00a61d700 (LWP 11241)):
#0  0x00007fb00f329216 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#1  0x00007fb0111eab2c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#2  0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#3  0x00007fb010fc3305 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#4  0x00007fb0128e5449 in  () at /usr/lib/libQt5Qml.so.5
#5  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#6  0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fb00b873700 (LWP 11221)):
#0  0x00007fb00f326dad in  () at /usr/lib/libglib-2.0.so.0
#1  0x00007fb00f3276cc in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007fb00f32782f in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007fb00f329118 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007fb00f329241 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007fb0111eab2c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007fb010fc3305 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007fb011a64b37 in  () at /usr/lib/libQt5DBus.so.5
#9  0x00007fb010fc4530 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fb0104b54cf in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007fb010c4e2d3 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7fb00c37ac80 (LWP 11176)):
[KCrash Handler]
#6  0x00007fb013263164 in KWayland::Client::OutputDevice::enabled() const () at /usr/lib/libKF5WaylandClient.so.5
#7  0x00007fb000f77cf8 in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#8  0x00007fb000f79fa9 in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#9  0x00007fb000f72eff in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#10 0x00007fb000f6f9c4 in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#11 0x00007fb0111bec20 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#12 0x00007fb000f7126b in  () at /usr/lib/qt/plugins/kf5/kscreen/KSC_KWayland.so
#13 0x00007fb0111bec20 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#14 0x00007fb0111bec20 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#15 0x00007fb0111bec20 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#16 0x00007fb01324f2d2 in KWayland::Client::Registry::interfaceRemoved(unsigned int) () at /usr/lib/libKF5WaylandClient.so.5
#17 0x00007fb00f2b66d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#18 0x00007fb00f2b60a0 in ffi_call () at /usr/lib/libffi.so.6
#19 0x00007fb010a90f8f in  () at /usr/lib/libwayland-client.so.0
#20 0x00007fb010a8d6ba in  () at /usr/lib/libwayland-client.so.0
#21 0x00007fb010a8ebfc in wl_display_dispatch_queue_pending () at /usr/lib/libwayland-client.so.0
#22 0x00007fb01325d35f in KWayland::Client::EventQueue::dispatch() () at /usr/lib/libKF5WaylandClient.so.5
#23 0x00007fb0111bf4fa in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#24 0x00007fb011cd14e5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#25 0x00007fb011cdae11 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#26 0x00007fb011192d12 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#27 0x00007fb011195a89 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#28 0x00007fb0111eb514 in  () at /usr/lib/libQt5Core.so.5
#29 0x00007fb00f3273ee in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#30 0x00007fb00f329201 in  () at /usr/lib/libglib-2.0.so.0
#31 0x00007fb00f329241 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#32 0x00007fb0111eab13 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#33 0x00007fb01119183c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#34 0x00007fb011199676 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#35 0x000055f7a1e8edc9 in  ()
#36 0x00007fb010b76153 in __libc_start_main () at /usr/lib/libc.so.6
#37 0x000055f7a1e8f22e in _start ()
[Inferior 1 (process 11176) detached]

Possible duplicates by query: bug 413881, bug 413877, bug 413832, bug 413831, bug 413782.

Reported using DrKonqi
Comment 1 Méven Car 2019-11-07 13:37:41 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
Comment 2 Christoph Feck 2019-12-01 14:49:25 UTC
*** Bug 413832 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Vrátil 2020-02-21 08:43:35 UTC
*** Bug 416455 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Vrátil 2020-02-21 08:43:47 UTC
*** Bug 417380 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Vrátil 2020-02-21 08:43:54 UTC
*** Bug 417864 has been marked as a duplicate of this bug. ***
Comment 6 Méven Car 2020-02-21 11:03:11 UTC
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();
            }
        });
    });
}
Comment 7 David Edmundson 2020-02-21 11:12:31 UTC
D27536
Comment 8 Daniel Vrátil 2020-02-21 11:51:59 UTC
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
Comment 9 Nate Graham 2021-02-26 16:54:45 UTC
*** Bug 415240 has been marked as a duplicate of this bug. ***