Bug 390092

Summary: plasmashell crashes on boot in QScreen::name() after ShellCorona::load()
Product: [Plasma] plasmashell Reporter: Andrius Štikonas <andrius>
Component: generic-waylandAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: aclassifiedmail, asturm, bugseforuns, JanHendriks, joern477, kde, kwj69641, nate, notmart, ruben_mueller, thomas.bettler, vishnugb
Priority: NOR Keywords: wayland
Version: 5.12.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: backtrace.txt
backtrace.txt

Description Andrius Štikonas 2018-02-08 18:27:56 UTC
sddm log file contains

ERROR:gl_surface_qt.cpp(480)] eglCreatePbufferSurface failed with error EGL_BAD_MATCH

I'll attach backtrace later if I manage to obtain it.
Comment 1 Andrius Štikonas 2018-02-08 19:03:09 UTC
Created attachment 110444 [details]
backtrace.txt
Comment 2 Andrius Štikonas 2018-02-14 22:36:52 UTC
*** Bug 390171 has been marked as a duplicate of this bug. ***
Comment 3 Andrius Štikonas 2018-02-14 23:04:02 UTC
It seems that this crash happens when some of the screens are disabled on boot. I don't see any crash with all outputs on.
Comment 4 Uby 2018-02-15 08:05:43 UTC
that's possible.
I have my Dell e7440 in an Docking station and an external monitor attached.
The screen from the Laptop is off, when the machine is starts.
Comment 5 Kai Uwe Broulik 2018-02-15 08:42:11 UTC
Pasting inline

Thread 1 (Thread 0x7f2e24801880 (LWP 1087)):
[KCrash Handler]
#6  0x0000000000000031 in ?? ()
#7  0x00007f2e1d679a65 in QScreen::name (this=0x560e90daa5c0) at kernel/qscreen.cpp:160
#8  0x0000560e905edb4b in ShellCorona::load (this=0x560e90e6dab0) at /var/tmp/portage/kde-plasma/plasma-workspace-5.12.0/work/plasma-workspace-5.12.0/shell/shellcorona.cpp:696
#9  0x0000560e9060bcc1 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (ShellCorona::*)()>::call(void (ShellCorona::*)(), ShellCorona*, void**) (f=(void (ShellCorona::*)(ShellCorona * const)) 0x560e905ed588 <ShellCorona::load()>, o=0x560e90e6dab0, arg=0x7ffce363f6f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:136
#10 0x0000560e9060a363 in QtPrivate::FunctionPointer<void (ShellCorona::*)()>::call<QtPrivate::List<>, void>(void (ShellCorona::*)(), ShellCorona*, void**) (f=(void (ShellCorona::*)(ShellCorona * const)) 0x560e905ed588 <ShellCorona::load()>, o=0x560e90e6dab0, arg=0x7ffce363f6f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:169
#11 0x0000560e90606f51 in QtPrivate::QSlotObject<void (ShellCorona::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x560e90feffd0, r=0x560e90e6dab0, a=0x7ffce363f6f0, ret=0x0) at /usr/include/qt5/QtCore/qobject_impl.h:120
#12 0x00007f2e1cb5fdad in QtPrivate::QSlotObjectBase::call (this=0x560e90feffd0, r=0x560e90e6dab0, a=0x7ffce363f6f0) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#13 0x00007f2e1cb5cd62 in QMetaObject::activate (sender=0x560e90d8f0a0, signalOffset=3, local_signal_index=1, argv=0x7ffce363f6f0) at kernel/qobject.cpp:3749
#14 0x00007f2e1cb5c686 in QMetaObject::activate (sender=0x560e90d8f0a0, m=0x7f2e23aba500 <KActivities::Consumer::staticMetaObject>, local_signal_index=1, argv=0x7ffce363f6f0) at kernel/qobject.cpp:3628
#15 0x00007f2e238a0cbb in KActivities::Consumer::serviceStatusChanged (this=0x560e90d8f0a0, _t1=KActivities::Consumer::Running) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0_build/src/lib/KF5Activities_autogen/EWIEGA46WW/moc_consumer.cpp:248
#16 0x00007f2e238a0643 in KActivities::Consumer::qt_static_metacall (_o=0x560e90d8f0a0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffce363f8f0) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0_build/src/lib/KF5Activities_autogen/EWIEGA46WW/moc_consumer.cpp:114
#17 0x00007f2e1cb5ce93 in QMetaObject::activate (sender=0x560e90e73d30, signalOffset=3, local_signal_index=8, argv=0x7ffce363f8f0) at kernel/qobject.cpp:3766
#18 0x00007f2e1cb5c686 in QMetaObject::activate (sender=0x560e90e73d30, m=0x7f2e23aba440 <KActivities::ActivitiesCache::staticMetaObject>, local_signal_index=8, argv=0x7ffce363f8f0) at kernel/qobject.cpp:3628
#19 0x00007f2e2389fe7f in KActivities::ActivitiesCache::serviceStatusChanged (this=0x560e90e73d30, _t1=KActivities::Consumer::Running) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0_build/src/lib/KF5Activities_autogen/EWIEGA46WW/moc_activitiescache_p.cpp:407
#20 0x00007f2e23894706 in KActivities::ActivitiesCache::setAllActivities (this=0x560e90e73d30, _activities=...) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0/src/lib/activitiescache_p.cpp:300
#21 0x00007f2e23895738 in KActivities::ActivitiesCache::passInfoFromReply<QList<ActivityInfo>, void (KActivities::ActivitiesCache::*)(QList<ActivityInfo> const&)> (this=0x560e90e73d30, watcher=0x560e90e93710, f=(void (KActivities::ActivitiesCache::*)(KActivities::ActivitiesCache * const, const QList<ActivityInfo> &)) 0x7f2e238945ae <KActivities::ActivitiesCache::setAllActivities(QList<ActivityInfo> const&)>) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0/src/lib/activitiescache_p.cpp:211
#22 0x00007f2e238942e1 in KActivities::ActivitiesCache::setAllActivitiesFromReply (this=0x560e90e73d30, watcher=0x560e90e93710) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0/src/lib/activitiescache_p.cpp:226
#23 0x00007f2e2389f2ef in KActivities::ActivitiesCache::qt_static_metacall (_o=0x560e90e73d30, _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x7ffce363fc10) at /var/tmp/portage/kde-frameworks/kactivities-5.42.0/work/kactivities-5.42.0_build/src/lib/KF5Activities_autogen/EWIEGA46WW/moc_activitiescache_p.cpp:200
#24 0x00007f2e1cb5ce93 in QMetaObject::activate (sender=0x560e90e93710, signalOffset=3, local_signal_index=0, argv=0x7ffce363fc10) at kernel/qobject.cpp:3766
#25 0x00007f2e1cb5c686 in QMetaObject::activate (sender=0x560e90e93710, m=0x7f2e1d2d5560 <QDBusPendingCallWatcher::staticMetaObject>, local_signal_index=0, argv=0x7ffce363fc10) at kernel/qobject.cpp:3628
#26 0x00007f2e1d0a216e in QDBusPendingCallWatcher::finished (this=0x560e90e93710, _t1=0x560e90e93710) at .moc/moc_qdbuspendingcall.cpp:153
#27 0x00007f2e1d0a21ff in QDBusPendingCallWatcherPrivate::_q_finished (this=0x560e90e96730) at qdbuspendingcall.cpp:494
#28 0x00007f2e1d0a1f02 in QDBusPendingCallWatcher::qt_static_metacall (_o=0x560e90e93710, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7f2dfc00b980) at .moc/moc_qdbuspendingcall.cpp:85
#29 0x00007f2e1cb55763 in QMetaCallEvent::placeMetaCall (this=0x7f2dfc00b9a0, object=0x560e90e93710) at kernel/qobject.cpp:503
#30 0x00007f2e1cb5672d in QObject::event (this=0x560e90e93710, e=0x7f2dfc00b9a0) at kernel/qobject.cpp:1246
#31 0x00007f2e1ded2a26 in QApplicationPrivate::notify_helper (this=0x560e90d99980, receiver=0x560e90e93710, e=0x7f2dfc00b9a0) at kernel/qapplication.cpp:3722
#32 0x00007f2e1decfe0d in QApplication::notify (this=0x7ffce3640660, receiver=0x560e90e93710, e=0x7f2dfc00b9a0) at kernel/qapplication.cpp:3094
#33 0x00007f2e1cb19c1f in QCoreApplication::notifyInternal2 (receiver=0x560e90e93710, event=0x7f2dfc00b9a0) at kernel/qcoreapplication.cpp:1016
#34 0x00007f2e1cb1e5a0 in QCoreApplication::sendEvent (receiver=0x560e90e93710, event=0x7f2dfc00b9a0) at kernel/qcoreapplication.h:233
#35 0x00007f2e1cb1b02a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x560e90d8fc80) at kernel/qcoreapplication.cpp:1676
#36 0x00007f2e1cb1a9e0 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1530
#37 0x00007f2e1cb9c1ea in postEventSourceDispatch (s=0x560e90e36420) at kernel/qeventdispatcher_glib.cpp:276
#38 0x00007f2e1377297a in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#39 0x00007f2e13772bb0 in ?? () from /usr/lib64/libglib-2.0.so.0
#40 0x00007f2e13772c3c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#41 0x00007f2e1cb9c9a4 in QEventDispatcherGlib::processEvents (this=0x560e90e05030, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#42 0x00007f2e059372f4 in ?? () from /usr/lib64/libQt5WaylandClient.so.5
#43 0x00007f2e1cb16b20 in QEventLoop::processEvents (this=0x7ffce3640540, flags=...) at kernel/qeventloop.cpp:134
#44 0x00007f2e1cb16e1d in QEventLoop::exec (this=0x7ffce3640540, flags=...) at kernel/qeventloop.cpp:212
#45 0x00007f2e1cb1a39a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1289
#46 0x00007f2e1d6330be in QGuiApplication::exec () at kernel/qguiapplication.cpp:1679
#47 0x00007f2e1decf7c7 in QApplication::exec () at kernel/qapplication.cpp:2910
#48 0x0000560e905c6000 in main (argc=1, argv=0x7ffce36407b8) at /var/tmp/portage/kde-plasma/plasma-workspace-5.12.0/work/plasma-workspace-5.12.0/shell/main.cpp:166
Comment 6 Kai Uwe Broulik 2018-02-15 08:44:17 UTC
The code in question is

if (!m_desktopViewforId.contains(m_screenPool->id(screen->name()))) {

and in QScreen::name() it does

return d->platformScreen->name();

so I suspect for whatever reason it never set a platform screen
Comment 7 Christoph Feck 2018-02-26 04:11:41 UTC
*** Bug 391065 has been marked as a duplicate of this bug. ***
Comment 8 Marco Martin 2018-03-19 17:32:40 UTC

*** This bug has been marked as a duplicate of bug 385342 ***
Comment 9 Andrius Štikonas 2019-02-17 00:09:38 UTC
Somehow the crash is gone after upgrading to Qt 5.12.1 (from Qt 5.12.0).
Comment 10 Andrius Štikonas 2019-02-17 00:24:44 UTC
Nope. It still crashed after a few more reboots.
Comment 11 Andrius Štikonas 2019-02-17 18:04:36 UTC
Created attachment 118157 [details]
backtrace.txt

Updating backtrace with Plasma 5.15.
Comment 12 Andrius Štikonas 2019-02-17 22:38:22 UTC
(In reply to Kai Uwe Broulik from comment #6)
> The code in question is
> 
> if (!m_desktopViewforId.contains(m_screenPool->id(screen->name()))) {
> 
> and in QScreen::name() it does
> 
> return d->platformScreen->name();
> 
> so I suspect for whatever reason it never set a platform screen

I think it's the QScreen::handle() function that crashes, i.e. call to d->platformScreen, not d->platformScren->name().
Comment 13 Christoph Feck 2019-10-24 08:19:42 UTC
*** Bug 412307 has been marked as a duplicate of this bug. ***
Comment 14 Vishnu 2020-04-07 13:29:52 UTC
When using the wayland session, plasma crashes every time I boot. I have a laptop connected to an external monitor via an HDMI cable. I use only the external monitor, and have the laptop's display disabled.

My crash log is probably useless because I have no debug symbols, but Thread 1 starts with:  
#6  0x00007f07ed45eb62 in QScreen::name() const () from /usr/lib/libQt5Gui.so.5

I'm currently on Qt 5.14.2 and Plasma 5.18.4.1
Comment 15 Andrius Štikonas 2020-04-07 19:43:32 UTC
(In reply to Vishnu from comment #14)
> When using the wayland session, plasma crashes every time I boot. I have a
> laptop connected to an external monitor via an HDMI cable. I use only the
> external monitor, and have the laptop's display disabled.
> 
> My crash log is probably useless because I have no debug symbols, but Thread
> 1 starts with:  
> #6  0x00007f07ed45eb62 in QScreen::name() const () from
> /usr/lib/libQt5Gui.so.5
> 
> I'm currently on Qt 5.14.2 and Plasma 5.18.4.1

After upgrading to Qt 5.14.1 one other Qt application (qTox) sometimes randomly crashes in QScreen::handle. It might be related to plasmashell crash...

I wonder if it is our bug (we are setting something incorrectly when at least one monitor is off) or bug on the Qt side.
Comment 16 Andrius Štikonas 2020-04-08 21:21:41 UTC
(In reply to Andrius Štikonas from comment #15)
> (In reply to Vishnu from comment #14)
> > When using the wayland session, plasma crashes every time I boot. I have a
> > laptop connected to an external monitor via an HDMI cable. I use only the
> > external monitor, and have the laptop's display disabled.
> > 
> > My crash log is probably useless because I have no debug symbols, but Thread
> > 1 starts with:  
> > #6  0x00007f07ed45eb62 in QScreen::name() const () from
> > /usr/lib/libQt5Gui.so.5
> > 
> > I'm currently on Qt 5.14.2 and Plasma 5.18.4.1
> 
> After upgrading to Qt 5.14.1 one other Qt application (qTox) sometimes
> randomly crashes in QScreen::handle. It might be related to plasmashell
> crash...
> 
> I wonder if it is our bug (we are setting something incorrectly when at
> least one monitor is off) or bug on the Qt side.

I looked a bit more at this.

So qTox bug is indeed seems to be related to this. And it might be easier to reproduce, since it happens all the time, not just on reboot.

To reproduce, you can do the following:

1) Start Wayland session with one screen turned off.
2) Start qTox.
3) Hover mouse over e.g. call button, so that popup notification is displayed
4) qTox crashes instead of showing popup.
Comment 17 Nate Graham 2021-02-08 19:34:16 UTC
See also Bug 414805.
Comment 18 David Edmundson 2021-02-22 23:24:38 UTC
*** Bug 433303 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2021-02-22 23:35:40 UTC

*** This bug has been marked as a duplicate of bug 421700 ***
Comment 20 Nate Graham 2021-06-09 23:02:11 UTC
*** Bug 438330 has been marked as a duplicate of this bug. ***