Bug 425711

Summary: Plasma crashes in PanelView::restore() when changing settings related to number of screens, screen scale, screen borders, etc
Product: [Plasma] plasmashell Reporter: mabg
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: a.samirh78, bugseforuns, danielwohlers, dragonpurpuracolocado, eam0809, gerhard.riener, germanoalves, kde, lostipodman, lukas, nate, oguilherme, plasma-bugs, queny, robert, simon.sylvain13, techxgames
Priority: VHI Keywords: drkonqi
Version: 5.19.4   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.21
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi

Description mabg 2020-08-23 13:12:38 UTC
Application: plasmashell (5.19.4)

Qt Version: 5.14.2
Frameworks Version: 5.73.0
Operating System: Linux 5.4.0-42-generic x86_64
Windowing system: Wayland
Distribution: KDE neon User Edition 5.19

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

I was selecting left middle border behavior. When choose the option to "Show Krunner", after Apply, crash.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f15708ffdcf in KConfigGroup::parent (this=this@entry=0x7ffd35976870) at ./src/core/kconfiggroup.cpp:545
#5  0x0000563fd1fe4341 in PanelView::restore (this=this@entry=0x563fd35fab40) at ./shell/panelview.cpp:576
#6  0x0000563fd1fe4762 in PanelView::containmentChanged (this=0x563fd35fab40) at ./shell/panelview.cpp:1179
#7  0x0000563fd1fe4bb3 in PanelView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffd35976a50) at ./obj-x86_64-linux-gnu/shell/plasmashell_autogen/include/moc_panelview.cpp:261
#8  0x00007f156f70b550 in doActivate<false> (sender=0x563fd35fab40, signal_index=43, argv=0x7ffd35976a50) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#9  0x00007f156f705af7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f1571a97000 <PlasmaQuick::ContainmentView::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x0) at kernel/qobject.cpp:3930
#10 0x00007f1571a6f847 in PlasmaQuick::ContainmentView::containmentChanged (this=<optimized out>) at ./obj-x86_64-linux-gnu/src/plasmaquick/KF5PlasmaQuick_autogen/include/moc_containmentview.cpp:267
#11 0x00007f1571a6fd1a in PlasmaQuick::ContainmentViewPrivate::setContainment (this=0x563fd33cce60, cont=0x563fd24f68c0) at ./src/plasmaquick/containmentview.cpp:93
#12 0x00007f1571a707ad in PlasmaQuick::ContainmentView::setContainment (this=this@entry=0x563fd35fab40, cont=<optimized out>) at ./src/plasmaquick/containmentview.cpp:256
#13 0x0000563fd1fee205 in ShellCorona::createWaitingPanels (this=0x563fd21d8b60) at ./shell/shellcorona.cpp:1406
#14 0x00007f156f70b51e in QtPrivate::QSlotObjectBase::call (a=0x7ffd35976ce0, r=0x563fd21d8b60, this=0x563fd2239de0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false> (sender=0x563fd21d8c18, signal_index=3, argv=0x7ffd35976ce0) at kernel/qobject.cpp:3870
#16 0x00007f156f705af7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f156f9b1ce0 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd35976ce0) at kernel/qobject.cpp:3930
#17 0x00007f156f70f2ce in QTimer::timeout (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#18 0x00007f156f7031c5 in QObject::event (this=0x563fd21d8c18, e=0x7ffd35977010) at kernel/qobject.cpp:1361
#19 0x00007f1570242cc3 in QApplicationPrivate::notify_helper (this=this@entry=0x563fd21a1b30, receiver=receiver@entry=0x563fd21d8c18, e=e@entry=0x7ffd35977010) at kernel/qapplication.cpp:3685
#20 0x00007f157024bf40 in QApplication::notify (this=0x7ffd359773a0, receiver=0x563fd21d8c18, e=0x7ffd35977010) at kernel/qapplication.cpp:3431
#21 0x00007f156f6d578a in QCoreApplication::notifyInternal2 (receiver=0x563fd21d8c18, event=0x7ffd35977010) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:153
#22 0x00007f156f72d530 in QTimerInfoList::activateTimers (this=0x563fd21d0140) at kernel/qtimerinfo_unix.cpp:643
#23 0x00007f156f72de1c in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#24 0x00007f156dabefbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f156dabf240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007f156dabf2e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f156f72e1e2 in QEventDispatcherGlib::processEvents (this=0x563fd21e2030, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007f156f6d424b in QEventLoop::exec (this=this@entry=0x7ffd35977250, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#29 0x00007f156f6dc296 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#30 0x0000563fd1fc8c09 in main (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:224
[Inferior 1 (process 8649) detached]

Possible duplicates by query: bug 423787, bug 422901, bug 415884, bug 413185, bug 377280.

Reported using DrKonqi
Comment 1 Daniel Wohlers 2020-09-16 09:01:12 UTC
Created attachment 131691 [details]
New crash information added by DrKonqi

plasmashell (5.19.5) using Qt 5.15.0

- What I was doing when the application crashed:

I restarted my notebook, because I couldn't connect my already paired bluetooth speakers.

I switched recently from x.org to wayland.

-- Backtrace (Reduced):
#4  0x00007fb055b1bd5f in KConfigGroup::parent (this=this@entry=0x7ffd71cf48f0) at ./src/core/kconfiggroup.cpp:545
#5  0x00005593333ad341 in PanelView::restore (this=this@entry=0x559334876780) at ./shell/panelview.cpp:576
#6  0x00005593333ad762 in PanelView::containmentChanged (this=0x559334876780) at ./shell/panelview.cpp:1179
#7  0x00005593333adbb3 in PanelView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffd71cf4ad0) at ./obj-x86_64-linux-gnu/shell/plasmashell_autogen/include/moc_panelview.cpp:261
#8  0x00007fb0548fb5e0 in doActivate<false> (sender=0x559334876780, signal_index=43, argv=0x7ffd71cf4ad0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
Comment 2 Nate Graham 2021-01-05 15:05:28 UTC
*** Bug 430656 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-01-05 15:05:34 UTC
*** Bug 430685 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2021-01-05 15:06:03 UTC
*** Bug 415884 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2021-01-05 15:06:37 UTC
*** Bug 422901 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-01-05 15:06:49 UTC
*** Bug 427096 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2021-01-05 15:07:11 UTC
*** Bug 422637 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2021-01-05 15:07:27 UTC
*** Bug 430548 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2021-01-05 15:07:40 UTC
*** Bug 428678 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-01-05 15:07:44 UTC
*** Bug 429240 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-01-05 15:08:23 UTC
Tons of dupes, raising priority.
Comment 12 David Edmundson 2021-01-05 23:54:04 UTC
There is an error path

KConfigGroup PanelView::panelConfig(ShellCorona *corona, Plasma::Containment *containment, QScreen *screen)
{
    if (!containment || !screen) {
        return KConfigGroup();
    }

which we call parent() on. That's obviously going to crash.


.
Comment 13 Bug Janitor Service 2021-01-05 23:57:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/553
Comment 14 Nate Graham 2021-01-08 00:11:14 UTC
*** Bug 431280 has been marked as a duplicate of this bug. ***
Comment 15 David Edmundson 2021-01-08 00:23:20 UTC
Git commit fa2bafea8f0cd9fac0864ac23f23c955d5f15b73 by David Edmundson.
Committed on 08/01/2021 at 00:23.
Pushed by davidedmundson into branch 'master'.

[panel] Fix crash on screen changes

There is an error handling path when we fetch the relevant config()

```
KConfigGroup PanelView::panelConfig(...
{
    if (!containment || !screen) {
        return KConfigGroup();
    }
```

which we indiscrimiately call parent() on.

This patch guards that case, which is presumably screen being
temporarily null.

This code is also Plasma 5.8 compatibility fallback, so arguably we
could get rid of it.

M  +4    -3    shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/fa2bafea8f0cd9fac0864ac23f23c955d5f15b73
Comment 16 Nate Graham 2021-01-26 06:17:29 UTC
*** Bug 432051 has been marked as a duplicate of this bug. ***
Comment 17 lostipodman 2021-02-22 22:10:52 UTC
Created attachment 136063 [details]
New crash information added by DrKonqi

plasmashell (5.21.0) using Qt 5.15.2

Including as on 5.21 and this bug shows as resolved on 5.21; sorry but it is NOT resolved
- What I was doing when the application crashed:
Happens immediately upon login when a monitor is attached and on a Wayland session
- Unusual behavior I noticed:
Seems to affect the fonts (they are not the correct size and they are blurry) in my Application Menu Bar (but not certain the two are related) 
- Custom settings of the application:
Monitor is connected via HDMI

-- Backtrace (Reduced):
#4  0x00007f97e66cb452 in QScreen::name (this=0x5649c00fb500) at kernel/qscreen.cpp:195
#5  0x00005649bf1a50df in ShellCorona::addOutput (this=this@entry=0x5649c05e0700, screen=<optimized out>, screen@entry=0x5649c00fb500) at /usr/src/debug/plasma5-workspace-5.21.0-1.1.x86_64/shell/shellcorona.cpp:1248
#6  0x00005649bf1a5d8b in ShellCorona::load (this=<optimized out>) at /usr/src/debug/plasma5-workspace-5.21.0-1.1.x86_64/shell/shellcorona.cpp:698
#7  0x00007f97e6186946 in QtPrivate::QSlotObjectBase::call (a=0x7ffff0eaca00, r=0x5649c05e0700, this=0x5649c03ae010) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x5649c030dac0, signal_index=4, argv=argv@entry=0x7ffff0eaca00) at kernel/qobject.cpp:3886