Bug 373461 - Plasma crashes in PanelView::updateEnabledBorders() when undocking laptop and screen configuration changes
Summary: Plasma crashes in PanelView::updateEnabledBorders() when undocking laptop and...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-multiscreen (show other bugs)
Version: 5.8.4
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: 1.0
Assignee: Aleix Pol
URL:
Keywords: drkonqi
: 373296 449845 450296 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-09 13:06 UTC by CK
Modified: 2022-02-21 15:59 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CK 2016-12-09 13:06:26 UTC
Application: plasmashell (5.8.4)

Qt Version: 5.7.0
Frameworks Version: 5.27.0
Operating System: Linux 4.8.11-300.fc25.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
Undocked laptop. Being docked it's connected to 2 FullHD screens

The crash can be reproduced every time.

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

Thread 10 (Thread 0x7f633d9cf700 (LWP 20220)):
#0  0x00007f641ef8300d in poll () at /lib64/libc.so.6
#1  0x00007f6413222f51 in poll_func () at /lib64/libpulse.so.0
#2  0x00007f6413214721 in pa_mainloop_poll () at /lib64/libpulse.so.0
#3  0x00007f6413214dbe in pa_mainloop_iterate () at /lib64/libpulse.so.0
#4  0x00007f6413214e70 in pa_mainloop_run () at /lib64/libpulse.so.0
#5  0x00007f6413222e99 in thread () at /lib64/libpulse.so.0
#6  0x00007f64129a8178 in internal_thread_func () at /usr/lib64/pulseaudio/libpulsecommon-9.0.so
#7  0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#8  0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 9 (Thread 0x7f634a3de700 (LWP 20219)):
#0  0x00007f641fd87842 in QTimerInfoList::timerWait(timespec&) () at /lib64/libQt5Core.so.5
#1  0x00007f641fd88a2c in timerSourcePrepareHelper(GTimerSource*, int*) () at /lib64/libQt5Core.so.5
#2  0x00007f641fd88af5 in timerSourcePrepare(_GSource*, int*) () at /lib64/libQt5Core.so.5
#3  0x00007f6417d27699 in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#4  0x00007f6417d2807b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#5  0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#6  0x00007f641fd88d8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#8  0x00007f641fb97643 in QThread::exec() () at /lib64/libQt5Core.so.5
#9  0x00007f6422e0b735 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#10 0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#11 0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#12 0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 8 (Thread 0x7f6357367700 (LWP 2813)):
#0  0x00007f641fb93ab9 in QMutex::lock() () at /lib64/libQt5Core.so.5
#1  0x00007f641fd88c4f in postEventSourcePrepare(_GSource*, int*) () at /lib64/libQt5Core.so.5
#2  0x00007f6417d27699 in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#3  0x00007f6417d2807b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#4  0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#5  0x00007f641fd88d8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f641fb97643 in QThread::exec() () at /lib64/libQt5Core.so.5
#8  0x00007f6358b382c7 in KCupsConnection::run() () at /lib64/libkcupslib.so
#9  0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#10 0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#11 0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7f6369d5e700 (LWP 2494)):
#0  0x00007f641ef8300d in poll () at /lib64/libc.so.6
#1  0x00007f6417d28156 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f641fd88d8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f641fb97643 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007f6423792ca6 in QQuickPixmapReader::run() () at /lib64/libQt5Quick.so.5
#7  0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#9  0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f63f3fff700 (LWP 2356)):
#0  0x00007f641e2df460 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f642562bbd4 in QTWTF::TCMalloc_PageHeap::scavengerThread() () at /lib64/libQt5Script.so.5
#2  0x00007f642562bc19 in  () at /lib64/libQt5Script.so.5
#3  0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#4  0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f63fdfc0700 (LWP 2295)):
#0  0x00007f6417d6d7f9 in g_mutex_lock () at /lib64/libglib-2.0.so.0
#1  0x00007f6417d276a6 in g_main_context_prepare () at /lib64/libglib-2.0.so.0
#2  0x00007f6417d2807b in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f641fd88d8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f641fb97643 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f6422e0b735 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#8  0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9  0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#10 0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f63ff9d4700 (LWP 2239)):
#0  0x00007f6417d6d814 in g_mutex_unlock () at /lib64/libglib-2.0.so.0
#1  0x00007f6417d2806e in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f641fd88d8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#4  0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f641fb97643 in QThread::exec() () at /lib64/libQt5Core.so.5
#6  0x00007f6422e0b735 in QQmlThreadPrivate::run() () at /lib64/libQt5Qml.so.5
#7  0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#9  0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f6405470700 (LWP 2196)):
#0  0x00007f641ef7ebdd in read () at /lib64/libc.so.6
#1  0x00007f6417d6c450 in g_wakeup_acknowledge () at /lib64/libglib-2.0.so.0
#2  0x00007f6417d27c60 in g_main_context_check () at /lib64/libglib-2.0.so.0
#3  0x00007f6417d280f4 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#4  0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#5  0x00007f641fd88d8b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#7  0x00007f641fb97643 in QThread::exec() () at /lib64/libQt5Core.so.5
#8  0x00007f642043e7a9 in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#9  0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#10 0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#11 0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f6406a5f700 (LWP 2175)):
#0  0x00007f641ef8300d in poll () at /lib64/libc.so.6
#1  0x00007f6423f4fd10 in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007f6423f51aa9 in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007f640a2b1a19 in QXcbEventReader::run() () at /lib64/libQt5XcbQpa.so.5
#4  0x00007f641fb9ba1a in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#5  0x00007f641e2d96ca in start_thread () at /lib64/libpthread.so.0
#6  0x00007f641ef8ef6f in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f6410f4a4c0 (LWP 2150)):
[KCrash Handler]
#6  0x00007f64200a16f0 in QScreen::geometry() const () at /lib64/libQt5Gui.so.5
#7  0x00005630de9672d2 in PanelView::updateEnabledBorders() ()
#8  0x00005630de96b5fb in PanelView::resizeEvent(QResizeEvent*) ()
#9  0x00007f64200852f5 in QWindow::event(QEvent*) () at /lib64/libQt5Gui.so.5
#10 0x00007f64238371b3 in QQuickWindow::event(QEvent*) () at /lib64/libQt5Quick.so.5
#11 0x00005630de96805b in PanelView::event(QEvent*) ()
#12 0x00007f642060f96c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#13 0x00007f6420617111 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#14 0x00007f641fd3b12a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#15 0x00007f642007698a in QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) () at /lib64/libQt5Gui.so.5
#16 0x00007f6420076bd6 in QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent*) () at /lib64/libQt5Gui.so.5
#17 0x00007f642007b965 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /lib64/libQt5Gui.so.5
#18 0x00007f642005c7cb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Gui.so.5
#19 0x00007f640a2e7c60 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5XcbQpa.so.5
#20 0x00007f6417d27e42 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#21 0x00007f6417d281c0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#22 0x00007f6417d2826c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#23 0x00007f641fd88d6f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#24 0x00007f641fd3a0ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#25 0x00007f641fd41bac in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#26 0x00005630de956442 in main ()

Reported using DrKonqi
Comment 1 Marco Martin 2016-12-12 09:38:33 UTC
apparently sometimes when a screen goes away there is a perios in which the panel window is still alive but its m_screenToFollow is already been deleted, access to it may have to be guarded everywhere
Comment 2 Marco Martin 2016-12-12 09:52:37 UTC
*** Bug 373296 has been marked as a duplicate of this bug. ***
Comment 3 Justin Zobel 2020-12-03 01:05:34 UTC
Thank you for the report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thank you.
Comment 4 CK 2020-12-03 14:16:07 UTC
(In reply to Justin Zobel from comment #3)
> Thank you for the report.
> 
> As it has been a while since this was reported, can you please test and
> confirm if this issue is still occurring or if this bug report can be marked
> as resolved.
> 
> I have set the bug status to "needsinfo" pending your response, please
> change back to "reported" or "resolved" when you respond, thank you.

can't test since don't have a docked laptop for 2 year already ))
Comment 5 Nate Graham 2022-02-11 16:58:03 UTC
*** Bug 449845 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2022-02-11 16:59:21 UTC
Got a new report (Bug 449845) from Plasma 5.24; re-opening. It has a fully-symbolicated backtrace, which I'm pasting here:

Thread 1 (Thread 0x7f2d553f34c0 (LWP 2311)):
[KCrash Handler]
#4  QScreen::geometry() const (this=0x0) at kernel/qscreen.cpp:413
#5  0x000055c2e81824e8 in PanelView::updateEnabledBorders() (this=this@entry=0x55c2ea3d3c40) at /usr/include/c++/9/bits/atomic_base.h:413
#6  0x000055c2e818682b in PanelView::resizeEvent(QResizeEvent*) (this=0x55c2ea3d3c40, ev=0x7ffe514a5720) at ./shell/panelview.cpp:786
#7  0x00007f2d59c03e0d in QWindow::event(QEvent*) (this=this@entry=0x55c2ea3d3c40, ev=ev@entry=0x7ffe514a5720) at kernel/qwindow.cpp:2438
#8  0x00007f2d5b30a24b in QQuickWindow::event(QEvent*) (this=this@entry=0x55c2ea3d3c40, e=e@entry=0x7ffe514a5720) at items/qquickwindow.cpp:1901
#9  0x000055c2e81869a7 in PanelView::event(QEvent*) (this=0x55c2ea3d3c40, e=0x7ffe514a5720) at ./shell/panelview.cpp:1030
#10 0x00007f2d5a525dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f2d5a52ebb8 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f2d5981219a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55c2ea3d3c40, event=0x7ffe514a5720) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#13 0x00007f2d59bf98b8 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) (e=0x55c2ebd969d0) at kernel/qguiapplication.cpp:3247
#14 0x00007f2d59bf9a4b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (e=0x55c2ebd969d0) at kernel/qguiapplication.cpp:2070
#15 0x00007f2d59bd17ac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#16 0x00007f2d54fbefbe in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#17 0x00007f2d57b3a17d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f2d57b3a400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f2d57b3a4a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f2d5986c9f2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55c2e8830250, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#21 0x00007f2d59810c9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe514a5a00, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#22 0x00007f2d59818e44 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#23 0x000055c2e816bd95 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:238
[Inferior 1 (process 2311) detached]
Comment 7 Bug Janitor Service 2022-02-15 00:33:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1458
Comment 8 Nate Graham 2022-02-15 21:24:11 UTC
*** Bug 450296 has been marked as a duplicate of this bug. ***
Comment 9 Marco Martin 2022-02-21 15:57:32 UTC
Git commit 61e935ea51fd44869bdab187486a203b014dd3ae by Marco Martin, on behalf of Aleix Pol.
Committed on 21/02/2022 at 15:38.
Pushed by apol into branch 'master'.

PanelView: Do not crash when the state is transitioning

M  +13   -11   shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/61e935ea51fd44869bdab187486a203b014dd3ae
Comment 10 Nate Graham 2022-02-21 15:59:17 UTC
Git commit 3520cd5a6251d568af7a1b286aa041df27851dfe by Nate Graham, on behalf of Aleix Pol.
Committed on 21/02/2022 at 15:59.
Pushed by ngraham into branch 'Plasma/5.24'.

PanelView: Do not crash when the state is transitioning


(cherry picked from commit 61e935ea51fd44869bdab187486a203b014dd3ae)

M  +13   -11   shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/3520cd5a6251d568af7a1b286aa041df27851dfe