<table><tr><td style="">sebas added a comment.</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D2330" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Here's the backtrace I get without this patch. The crash actually happens inside the debug message, but when it happens, it also means that the mode id we try to pass into xcb_randr_set_crtc_config is invalid (most likely 0)</p>
<p>with disabled output:</p>
<p>kscreen-doctor output.280.enable output.280.position.2560,0 output.mode.</p>
<p>/home/sebas/kf5/install/lib/x86_64-linux-gnu/libexec/kf5/kscreen_backend_launcher crashes</p>
<p>[01::04:27.959] XRandRConfig::enableOutput: Trying to find a CRTC for 280 , crtcs: QMap((63, XRandRCrtc(0x479fc0))(64, XRandRCrtc(0x47a010))(65, XRandRCrtc(0x4808c0)))<br />
[01::04:27.959] XRandRConfig::enableOutput: Testing CRTC 63<br />
[01::04:27.959] XRandRConfig::enableOutput: Free: false<br />
[01::04:27.960] XRandRConfig::enableOutput: Mode: 72<br />
[01::04:27.960] XRandRConfig::enableOutput: Possible outputs: QVector(66, 67, 68, 69, 70, 278, 279, 280)<br />
[01::04:27.960] XRandRConfig::enableOutput: Connected outputs: QVector(66)<br />
[01::04:27.960] XRandRConfig::enableOutput: Geometry: QRect(0,0 2560x1440)<br />
[01::04:27.960] XRandRConfig::enableOutput: Testing CRTC 64<br />
[01::04:27.960] XRandRConfig::enableOutput: Free: true<br />
[01::04:27.960] XRandRConfig::enableOutput: Mode: 0<br />
[01::04:27.960] XRandRConfig::enableOutput: Possible outputs: QVector(66, 67, 68, 69, 70, 278, 279, 280)<br />
[01::04:27.960] XRandRConfig::enableOutput: Connected outputs: QVector()<br />
[01::04:27.960] XRandRConfig::enableOutput: Geometry: QRect(2560,0 0x0)<br />
[01::04:27.961] XRandRConfig::enableOutput: RRSetCrtcConfig (enable output)<br />
[01::04:27.961] XRandRConfig::enableOutput: Output: 280 ( "DP-2-3" )<br />
[01::04:27.961] XRandRConfig::enableOutput: New CRTC: 64<br />
[01::04:27.961] XRandRConfig::enableOutput: Pos: QPoint(2560,0)</p>
<p>Thread 1 "kscreen_backend" received signal SIGSEGV, Segmentation fault.<br />
0x00007ffff7fd71ee in KScreen::Mode::size (this=0x0) at /home/sebas/kf5/src/kde/workspace/libkscreen/src/mode.cpp:102<br />
102 return d->size;<br />
(gdb) bt<br />
#0 0x00007ffff7fd71ee in KScreen::Mode::size (this=0x0) at /home/sebas/kf5/src/kde/workspace/libkscreen/src/mode.cpp:102<br />
#1 0x00007fffe908667b in XRandRConfig::enableOutput (this=0x479100, kscreenOutput=...) at /home/sebas/kf5/src/kde/workspace/libkscreen/backends/xrandr/xrandrconfig.cpp:521<br />
#2 0x00007fffe9081798 in XRandRConfig::applyKScreenConfig (this=0x479100, config=...) at /home/sebas/kf5/src/kde/workspace/libkscreen/backends/xrandr/xrandrconfig.cpp:290<br />
#3 0x00007fffe907cb20 in XRandR::setConfig (this=0x47a0c0, config=...) at /home/sebas/kf5/src/kde/workspace/libkscreen/backends/xrandr/xrandr.cpp:215<br />
#4 0x00000000004065e4 in BackendDBusWrapper::setConfig (this=0x480210, configMap=...) at /home/sebas/kf5/src/kde/workspace/libkscreen/src/backendlauncher/backenddbuswrapper.cpp:85<br />
#5 0x0000000000408496 in BackendAdaptor::setConfig (this=0x479dd0, in0=...) at /home/sebas/kf5/build/kde/workspace/libkscreen/src/backendlauncher/backendadaptor.cpp:51<br />
#6 0x00000000004085f8 in BackendAdaptor::qt_static_metacall (_o=0x479dd0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffce80)</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">at /home/sebas/kf5/build/kde/workspace/libkscreen/src/backendlauncher/backendadaptor.moc:113</pre></div>
<p>#7 0x0000000000408774 in BackendAdaptor::qt_metacall (this=0x479dd0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffce80)</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">at /home/sebas/kf5/build/kde/workspace/libkscreen/src/backendlauncher/backendadaptor.moc:156</pre></div>
<p>#8 0x00007ffff7f0c280 in QDBusConnectionPrivate::deliverCall (this=0x7fffdc0030f0, object=0x479dd0, msg=..., metaTypes=..., slotIdx=8) at qdbusintegrator.cpp:978<br />
#9 0x00007ffff7f0ba70 in QDBusConnectionPrivate::activateCall (this=0x7fffdc0030f0, object=0x479dd0, flags=273, msg=...) at qdbusintegrator.cpp:881<br />
#10 0x00007ffff7f0f71e in QDBusConnectionPrivate::activateObject (this=0x7fffdc0030f0, node=..., msg=..., pathStartPos=8) at qdbusintegrator.cpp:1470<br />
#11 0x00007ffff7f0ff76 in QDBusActivateObjectEvent::placeMetaCall (this=0x7fffdc00f6c0) at qdbusintegrator.cpp:1590<br />
#12 0x00007ffff739cd7e in QObject::event (this=0x480210, e=0x7fffdc00f6c0) at kernel/qobject.cpp:1256<br />
#13 0x00007ffff7363052 in QCoreApplicationPrivate::notify_helper (receiver=0x480210, event=0x7fffdc00f6c0) at kernel/qcoreapplication.cpp:1149<br />
#14 0x00007ffff7362cd5 in doNotify (receiver=0x480210, event=0x7fffdc00f6c0) at kernel/qcoreapplication.cpp:1090<br />
#15 0x00007ffff7362c48 in QCoreApplication::notify (this=0x7fffffffdab0, receiver=0x480210, event=0x7fffdc00f6c0) at kernel/qcoreapplication.cpp:1076<br />
#16 0x00007ffff778e5b0 in QGuiApplication::notify (this=0x7fffffffdab0, object=0x480210, event=0x7fffdc00f6c0) at kernel/qguiapplication.cpp:1616<br />
#17 0x00007ffff7362bd8 in QCoreApplication::notifyInternal2 (receiver=0x480210, event=0x7fffdc00f6c0) at kernel/qcoreapplication.cpp:1015<br />
#18 0x00007ffff7366c0e in QCoreApplication::sendEvent (receiver=0x480210, event=0x7fffdc00f6c0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:225<br />
#19 0x00007ffff7363fc0 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x426c90) at kernel/qcoreapplication.cpp:1650<br />
#20 0x00007ffff7363940 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1508<br />
#21 0x00007ffff73dcb1e in postEventSourceDispatch (s=0x468920) at kernel/qeventdispatcher_glib.cpp:270<br />
#22 0x00007ffff2d261a7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br />
#23 0x00007ffff2d26400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br />
#24 0x00007ffff2d264ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br />
#25 0x00007ffff73dd2f7 in QEventDispatcherGlib::processEvents (this=0x467030, flags=...) at kernel/qeventdispatcher_glib.cpp:417<br />
#26 0x00007fffeee481ac in QPAEventDispatcherGlib::processEvents (this=0x467030, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:115<br />
#27 0x00007ffff735f54e in QEventLoop::processEvents (this=0x7fffffffda00, flags=...) at kernel/qeventloop.cpp:128<br />
#28 0x00007ffff735f84a in QEventLoop::exec (this=0x7fffffffda00, flags=...) at kernel/qeventloop.cpp:204<br />
#29 0x00007ffff7363322 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285<br />
#30 0x00007ffff778e560 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1607<br />
#31 0x0000000000404c40 in main (argc=1, argv=0x7fffffffdc28) at /home/sebas/kf5/src/kde/workspace/libkscreen/src/backendlauncher/main.cpp:43</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rLIBKSCREEN KScreen Library</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D2330" rel="noreferrer">https://phabricator.kde.org/D2330</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>sebas, dvratil<br /><strong>Cc: </strong>plasma-devel, Plasma, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>