Bug 419492 - Plasma crashes in QPlatformScreen::screen() immediately after login to Wayland session with an external monitor connected to hdmi port and mult-monitor mode set to "Switch to external screen"
Summary: Plasma crashes in QPlatformScreen::screen() immediately after login to Waylan...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Unclassified
Component: Multi-screen support (show other bugs)
Version: master
Platform: unspecified Linux
: VHI crash
Target Milestone: 1.0
Assignee: Aleix Pol
URL:
Keywords: drkonqi, wayland
: 419493 419496 419733 419747 419756 422332 430739 433520 440680 442196 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-01 12:28 UTC by Patrick Silva
Modified: 2022-05-23 14:55 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-04-01 12:28:08 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:
I started Wayland session with an external monitor connected to hdmi port, multi-monitor mode was configured as "Switch to external screen", plasma shown a crash notification immediately after login.

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7f2bd2ff0c80 (LWP 1082))]
[KCrash Handler]
#7  QWeakPointer<QObject>::internalData (this=0x8) at ../../include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:701
#8  QPointer<QScreen>::data (this=0x8) at ../../include/QtCore/../../src/corelib/kernel/qpointer.h:77
#9  QPointer<QScreen>::operator QScreen* (this=0x8) at ../../include/QtCore/../../src/corelib/kernel/qpointer.h:83
#10 QPlatformScreen::screen (this=this@entry=0x55e8dcf93ff0) at kernel/qplatformscreen.cpp:154
#11 0x00007f2bc03c86a0 in QtWaylandClient::QWaylandWindow::handleScreensChanged (this=0x55e8dd285e10) at qwaylandwindow.cpp:969
#12 0x00007f2bcd004fe7 in QtPrivate::QSlotObjectBase::call (a=0x7ffe4522a170, r=0x55e8dd285e10, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#13 doActivate<false> (sender=0x55e8dd3019e0, signal_index=3, argv=0x7ffe4522a170) at kernel/qobject.cpp:3870
#14 0x00007f2bccfff8a2 in QMetaObject::activate (sender=sender@entry=0x55e8dd3019e0, m=m@entry=0x7f2bc0686d20 <QtWaylandClient::QWaylandSurface::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3930
#15 0x00007f2bc03e6840 in QtWaylandClient::QWaylandSurface::screensChanged (this=this@entry=0x55e8dd3019e0) at .moc/moc_qwaylandsurface_p.cpp:155
#16 0x00007f2bc03ce7a4 in QtWaylandClient::QWaylandSurface::surface_enter (this=0x55e8dd3019e0, output=0x55e8dcf92b80) at qwaylandsurface.cpp:97
#17 0x00007f2bc603ddae in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#18 0x00007f2bc603d71f in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#19 0x00007f2bcb7d1e24 in ?? () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#20 0x00007f2bcb7ce659 in ?? () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#21 0x00007f2bcb7cfb24 in wl_display_dispatch_queue_pending () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#22 0x00007f2bc03c0642 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x55e8dcf90750) at qwaylanddisplay.cpp:208
#23 0x00007f2bcd004dc9 in doActivate<false> (sender=0x55e8dcfb7620, signal_index=4, argv=0x7ffe4522a6a0) at kernel/qobject.cpp:3882
#24 0x00007f2bccfff8a2 in QMetaObject::activate (sender=sender@entry=0x55e8dcfb7620, m=m@entry=0x7f2bcd497240 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3930
#25 0x00007f2bccfc64b3 in QAbstractEventDispatcher::awake (this=this@entry=0x55e8dcfb7620) at .moc/moc_qabstracteventdispatcher.cpp:149
#26 0x00007f2bcd0290fb in QEventDispatcherGlib::processEvents (this=0x55e8dcfb7620, flags=...) at kernel/qeventdispatcher_glib.cpp:430
#27 0x00007f2bccfc863a in QEventLoop::exec (this=this@entry=0x7ffe4522a7c0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#28 0x00007f2bccfd1db0 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1400
#29 0x000055e8db8a5058 in main (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:220

Possible duplicates by query: bug 419060, bug 418477, bug 416347, bug 412307, bug 411959.

Reported using DrKonqi
Comment 1 Christoph Feck 2020-04-21 08:20:52 UTC
*** Bug 419493 has been marked as a duplicate of this bug. ***
Comment 2 Christoph Feck 2020-04-21 08:22:53 UTC
*** Bug 419733 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2020-04-21 08:23:20 UTC
*** Bug 419747 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2020-04-21 08:37:34 UTC
A lot of crash reports for a Plasma Wayland session on this multi-monitor system:

https://bugs.kde.org/buglist.cgi?bug_severity=crash&chfield=%5BBug creation%5D&chfieldfrom=2020-04-01&chfieldto=2020-04-07&email1=bugseforuns&emailreporter1=1&emailtype1=substring&query_format=advanced
Comment 6 Nate Graham 2021-02-25 03:22:59 UTC
*** Bug 433520 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2021-02-25 03:23:12 UTC
*** Bug 422332 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2021-02-25 20:58:01 UTC
*** Bug 419756 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2021-03-04 19:41:13 UTC
*** Bug 430739 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-03-04 19:41:14 UTC
*** Bug 419496 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-08-07 19:30:12 UTC
Raising to VHI due to number of duplicates.
Comment 12 Tony 2021-08-08 04:56:19 UTC
*** Bug 440680 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-09-09 17:38:57 UTC
*** Bug 442196 has been marked as a duplicate of this bug. ***
Comment 14 Bug Janitor Service 2021-10-18 17:38:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1125
Comment 15 David Edmundson 2021-10-19 14:22:22 UTC
Git commit 13fb70fec16efca4f54788cd9c87c8ece4700d03 by David Edmundson.
Committed on 19/10/2021 at 13:07.
Pushed by ngraham into branch 'master'.

[shell] Ignore placeholder screens

A placeholder screen is created by Qt when no real screens exist. We
don't want to create panels and containments for those, it is a whole
world of pain.

Plasma has a hook to ignore some screens which is extended with this
check.

M  +3    -0    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/13fb70fec16efca4f54788cd9c87c8ece4700d03
Comment 16 Nate Graham 2021-10-19 14:22:45 UTC
Git commit 7956d7b2e18133b92ec5d6cab674b1390daac9b8 by Nate Graham, on behalf of David Edmundson.
Committed on 19/10/2021 at 14:22.
Pushed by ngraham into branch 'Plasma/5.23'.

[shell] Ignore placeholder screens

A placeholder screen is created by Qt when no real screens exist. We
don't want to create panels and containments for those, it is a whole
world of pain.

Plasma has a hook to ignore some screens which is extended with this
check.


(cherry picked from commit 13fb70fec16efca4f54788cd9c87c8ece4700d03)

M  +3    -0    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/7956d7b2e18133b92ec5d6cab674b1390daac9b8
Comment 17 Vlad Zahorodnii 2022-01-12 15:30:19 UTC
I can't reproduce this crash. Can you confirm that this issue is still present?
Comment 18 Patrick Silva 2022-01-14 11:29:05 UTC
I'm unable to test on neon unstable. Plasma always starts with mult-monitor mode set to "Switch to laptop screen".
And kded5 crashes when I try to start Plasma with a different multi-monitor mode.

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f58758a7859 in __GI_abort () at abort.c:79
#2  0x00007f5875d03bd7 in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1914
#3  QMessageLogger::fatal (this=this@entry=0x7ffcf16f1170, msg=msg@entry=0x7f58769ea8c5 "%s") at global/qlogging.cpp:893
#4  0x00007f5876531a53 in init_platform (argv=<optimized out>, argc=@0x7ffcf16f142c: 12, platformThemeName=..., platformPluginPath=..., pluginNamesWithArguments=...) at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:208
#5  QGuiApplicationPrivate::createPlatformIntegration (this=0x561a97a172d0) at kernel/qguiapplication.cpp:1481
#6  0x00007f5876531ee8 in QGuiApplicationPrivate::createEventDispatcher (this=<optimized out>) at kernel/qguiapplication.cpp:1498
#7  0x00007f5875f2cab6 in QCoreApplicationPrivate::init (this=this@entry=0x561a97a172d0) at kernel/qcoreapplication.cpp:853
#8  0x00007f5876535003 in QGuiApplicationPrivate::init (this=this@entry=0x561a97a172d0) at kernel/qguiapplication.cpp:1527
#9  0x00007f5876c3811d in QApplicationPrivate::init (this=0x561a97a172d0) at kernel/qapplication.cpp:513
#10 0x0000561a95c7ec15 in main (argc=<optimized out>, argv=0x7ffcf16f16d8) at ./src/main.cpp:100
Comment 19 Nate Graham 2022-01-14 17:16:52 UTC
> Plasma always starts with multi-monitor mode set to "Switch to laptop screen".
Can confirm that. Is there another bug report about it?
Comment 20 Patrick Silva 2022-01-14 20:32:35 UTC
(In reply to Nate Graham from comment #19)
> > Plasma always starts with multi-monitor mode set to "Switch to laptop screen".
> Can confirm that. Is there another bug report about it?

I haven't seen any so far.
Comment 21 galder 2022-01-26 13:59:31 UTC
should not  be this ticket set as confirmed?
Comment 22 galder 2022-01-26 14:30:34 UTC
moving to confirmed
Comment 23 Nate Graham 2022-05-12 12:49:28 UTC
Patrick, can you still reproduce this in current git master? There have been a lot of multi-screen Wayland fixes recently.
Comment 24 Patrick Silva 2022-05-21 14:03:28 UTC
Plasma is no longer crashing after the provided steps, but plasmasession is. Reported as bug 454159.