Bug 344868 - Plasmashell crashes on startup with multiple monitors in KScreen::Config::connectedOutputs (this=0x0)
Summary: Plasmashell crashes on startup with multiple monitors in KScreen::Config::con...
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: libkscreen (show other bugs)
Version: 5.2.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 1.0
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-05 13:29 UTC by Krzysztof Nowicki
Modified: 2015-06-04 12:26 UTC (History)
4 users (show)

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


Attachments
kscreen-console.log (12.78 KB, text/plain)
2015-03-18 14:39 UTC, Krzysztof Nowicki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Nowicki 2015-03-05 13:29:08 UTC
I have a crash which happens only if I boot my laptop in the docking station with two monitor attached. It doesn't happen always - seems to be timing related. I've never seen this when booting with just the internal display.

The crash dump below was done with plasma 5.2.0 and KF 5.6, but it also occurs on 5.2.1 and KF 5.7. The problem was originally reported as part of #340198, but I have been told to report it separately.

My OS is Gentoo, Qt 5.4, KF 5.7, Plasma 5.2.1

Thread 1 (Thread 0x7f445cffb840 (LWP 8473)):
[KCrash Handler]
#5  KScreen::Config::connectedOutputs (this=0x0) at /var/tmp/portage/kde-plasma/libkscreen-5.2.0/work/libkscreen-5.2.0/src/config.cpp:196
#6  0x00007f44694a38b9 in ShellCorona::reconsiderOutputs (this=0x7f44699fddf0) at /var/tmp/portage/kde-plasma/plasma-workspace-5.2.0-r1/work/plasma-workspace-5.2.0/shell/shellcorona.cpp:763
#7  0x00007f446706f746 in call () at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#8  QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x7f44699fded8, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3702
#9  0x00007f4467070455 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x7f44699fded8, m=m@entry=0x7f44672a94e0 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3582
#10 0x00007f4467126986 in QTimer::timeout(QTimer::QPrivateSignal) (this=this@entry=0x7f44699fded8) at .moc/moc_qtimer.cpp:192
#11 0x00007f4467069a94 in QTimer::timerEvent(QTimerEvent*) (this=0x7f44699fded8, e=<optimized out>) at kernel/qtimer.cpp:247
#12 0x00007f4467057602 in QObject::event(QEvent*) (this=0x7f44699fded8, e=<optimized out>) at kernel/qobject.cpp:1226
#13 0x00007f4467c3980c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007f4467c3a172 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007f44670be42d in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7fff1fc9ff40, receiver=0x7f44699fded8, event=event@entry=0x7fff1fc9fb40) at kernel/qcoreapplication.cpp:932
#16 0x00007f44670cf31c in sendEvent (event=0x7fff1fc9fb40, receiver=<optimized out>) at kernel/qcoreapplication.h:228
#17 QTimerInfoList::activateTimers() (this=0x7f44699fc400) at kernel/qtimerinfo_unix.cpp:635
#18 0x00007f44670cf44f in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:177
#19 0x00007f44642bb2bc in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#20 0x00007f44642bb5c8 in ?? () from /usr/lib64/libglib-2.0.so.0
#21 0x00007f44642bb6d1 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#22 0x00007f44670c49ed in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f44699fa250, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#23 0x00007f44670bba4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff1fc9fdd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#24 0x00007f44670c06e8 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1185
#25 0x00007f446946d953 in main (argc=2, argv=<optimized out>) at /var/tmp/portage/kde-plasma/plasma-workspace-5.2.0-r1/work/plasma-workspace-5.2.0/shell/main.cpp:150

(gdb) frame 6
#6  0x00007f44694a38b9 in ShellCorona::reconsiderOutputs (this=0x7f44699fddf0) at /var/tmp/portage/kde-plasma/plasma-workspace-5.2.0-r1/work/plasma-workspace-5.2.0/shell/shellcorona.cpp:763
763         foreach (const KScreen::OutputPtr &out, m_screenConfiguration->connectedOutputs()) {
(gdb) p this
$2 = (ShellCorona * const) 0x7f44699fddf0
(gdb) p *this
$3 = {<Plasma::Corona> = {<No data fields>}, m_shell = {d = 0x7f446a0590f0}, m_views = {<QListSpecialMethods> = {<No data fields>}, {p = {d = 0x7f44671f68a0 <QListData::shared_null>}, d = 0x7f44671f68a0 <QListData::shared_null>}},  m_activityController = 0x7f4469ad7110, m_activityConsumer = 0x7f4469acf290, m_panelViews = {{d = 0x7f44671f6820 <QHashData::shared_null>, e = 0x7f44671f6820 <QHashData::shared_null>}}, m_desktopDefaultsConfig = <incomplete type>,   m_waitingPanels = {<QListSpecialMethods> = {<No data fields>}, {p = {d = 0x7f44671f68a0 <QListData::shared_null>}, d = 0x7f44671f68a0 <QListData::shared_null>}}, m_activities = {{d = 0x7f44671f6820 <QHashData::shared_null>,  e = 0x7f44671f6820 <QHashData::shared_null>}}, m_desktopContainments = {{d = 0x7f44671f6820 <QHashData::shared_null>, e = 0x7f44671f6820 <QHashData::shared_null>}}, m_addPanelAction = 0x7f4469ad9e00, m_addPanelsMenu = 0x7f4469adcea0,  m_lookAndFeelPackage = {d = {d = 0x7f4469ab0c50}}, m_redundantOutputs = {q_hash = {{d = 0x7f44671f6820 <QHashData::shared_null>, e = 0x7f44671f6820 <QHashData::shared_null>}}}, m_alternativesObjects = {<QListSpecialMethods> = {<No data fields>}, {p = {d = 0x7f44671f68a0 <QListData::shared_null>}, d = 0x7f44671f68a0 <QListData::shared_null>}}, m_interactiveConsole = 0x0, m_screenConfiguration = {value = 0x0, d = 0x0}, m_waitingPanelsTimer = {<QObject> = {_vptr.QObject = 0x7f44672abc10 <vtable for QTimer+16>, d_ptr = {d = 0x7f4469acc470}}, id = -1, inter = 250, del = 0, single = 1, nulltimer = 0, type = 1}, m_appConfigSyncTimer = {<QObject> = {_vptr.QObject = 0x7f44672abc10 <vtable for QTimer+16>,  d_ptr = {d = 0x7f4469ab2fc0}}, id = -1, inter = 10000, del = 0, single = 1, nulltimer = 0, type = 1}, m_reconsiderOutputsTimer = {<QObject> = {_vptr.QObject = 0x7f44672abc10 <vtable for QTimer+16>, d_ptr = {d = 0x7f4469acdc80}}, id = -1, inter = 1000, 
    del = 0, single = 1, nulltimer = 0, type = 1}}

Reproducible: Sometimes

Steps to Reproduce:
1. Connect more than one monitor.
2. Boot the system with Plasma 5.2

Actual Results:  
A Drkonqi dialog appears informing about a crash in plasmashell.

Expected Results:  
No crash should happen.
Comment 1 Daniel Vrátil 2015-03-18 10:44:44 UTC
This means that ShellCorona::reconsiderOutputs is called when KScreen config is not available: either because of error, or because the method is somehow called before the config is received.

Could you provide output from "kscreen-console bug" with the monitors connected?
Comment 2 Krzysztof Nowicki 2015-03-18 14:39:34 UTC
Created attachment 91620 [details]
kscreen-console.log

Attached the requested log with laptop docked and both monitors connected.
Comment 3 Daniel Vrátil 2015-03-27 09:47:55 UTC
Thanks for the info. The output seems OK, so the problem is most probably that something in Plasma calls the reconsiderOutputs() too early. Will investigate.
Comment 4 Krzysztof Nowicki 2015-05-28 08:40:49 UTC
This doesn't happen to me any more since I've upgraded to Plasma 5.3.0 and KF 5.10.0
Comment 5 Daniel Vrátil 2015-06-04 12:26:28 UTC
Great news then! Marking as fixed, feel free to reopen if you should hit the crash again with Plasma 5.3.