Bug 419741

Summary: Plasma on Wayland crashed in QScreen::devicePixelRatio() when I switched between "Switch to external screen" and "Switch to laptop screen" multi-monitor modes
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: crash CC: alex765, bjoernv, Bmoon2023, nate, plasma-bugs, postix
Priority: NOR Keywords: drkonqi, multiscreen, wayland
Version: master   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=421700
https://bugs.kde.org/show_bug.cgi?id=472732
Latest Commit: Version Fixed In:

Description Patrick Silva 2020-04-06 17:37:52 UTC
Application: plasmashell (5.18.80)

Qt Version: 5.14.1
Frameworks Version: 5.69.0
Operating System: Linux 5.3.0-45-generic x86_64
Windowing system: Wayland
Distribution: KDE neon Unstable Edition

-- Information about the crash:
- What I was doing when the application crashed:
Wayland session, external monitor connected to hdmi port, I switched between "Switch to external screen" and "Switch to laptop screen" multi-monitor modes, Plasma crashed.

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7ffb860e6c80 (LWP 1824))]
[KCrash Handler]
#7  0x00007ffb806f4593 in QScreen::devicePixelRatio() const (this=0x5617a307a2c0) at kernel/qscreen.cpp:345
#8  0x00007ffb84036622 in QQuickWindow::physicalDpiChanged() (this=this@entry=0x561798bb9790) at items/qquickwindow.cpp:366
#9  0x00007ffb840367a1 in QQuickWindow::handleScreenChanged(QScreen*) (this=0x561798bb9790, screen=0x5617a307a2c0) at items/qquickwindow.cpp:378
#10 0x00007ffb84038dec in QQuickWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qquickwindow.cpp:297
#11 0x00007ffb8010bdc9 in doActivate<false>(QObject*, int, void**) (sender=0x561798bb9790, signal_index=3, argv=0x7ffcb033f1b0) at kernel/qobject.cpp:3882
#12 0x00007ffb801068a2 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x561798bb9790, m=m@entry=0x7ffb80e417e0 <QWindow::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffcb033f1b0) at kernel/qobject.cpp:3930
#13 0x00007ffb806d067f in QWindow::screenChanged(QScreen*) (this=this@entry=0x561798bb9790, _t1=<optimized out>, _t1@entry=0x5617a307a2c0) at .moc/moc_qwindow.cpp:714
#14 0x00007ffb806d0ed3 in QWindowPrivate::emitScreenChangedRecursion(QScreen*) (this=this@entry=0x5617988a0ce0, newScreen=newScreen@entry=0x5617a307a2c0) at kernel/qwindow.cpp:484
#15 0x00007ffb806d796e in QWindowPrivate::setTopLevelScreen(QScreen*, bool) (this=0x5617988a0ce0, newScreen=0x5617a307a2c0, recreate=recreate@entry=false) at kernel/qwindow.cpp:508
#16 0x00007ffb806ca048 in QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent*) (wse=0x7ffb6c057e40) at kernel/qguiapplication.cpp:2471
#17 0x00007ffb806ce125 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (e=e@entry=0x7ffb6c057e40) at kernel/qguiapplication.cpp:1968
#18 0x00007ffb806a701b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...) at kernel/qwindowsysteminterface.cpp:1163
#19 0x00007ffb734fbcd0 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#20 0x00007ffb7959b417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffb7959b650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffb7959b6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffb801300bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5617987f5bd0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#24 0x00007ffb800cf63a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffcb033f5b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#25 0x00007ffb800d8db0 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1400
#26 0x0000561796969058 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:220

Possible duplicates by query: bug 386383.

Reported using DrKonqi
Comment 1 postix 2020-10-24 14:09:02 UTC
*** Bug 391229 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2022-01-12 18:20:13 UTC
Can't reproduce with current git master. Can you check again with at least Plasma 5.23? Git master or the Plasma 5.24 beta (released tomorrow) would be even better. :)
Comment 3 Patrick Silva 2022-01-14 11:35:22 UTC
Currently it's impossible to switch from external screen to laptop screen on neon unstable. Nothing happens when I try to do it.
Comment 4 Patrick Silva 2022-01-14 11:42:35 UTC
Another problem:
1. try to switch from external screen to laptop screen: nothing happens
2. now try to switch to 'Extended to right' multi-monitor mode: the system freezes completely, including mouse pointer.

Weirdly 'coredumpctl' command does not revel any crash.