https://bugs.kde.org/show_bug.cgi?id=368494

            Bug ID: 368494
           Summary: Crash in XRanDRConfig when connecting HDMI output
           Product: KScreen
           Version: git
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: libkscreen
          Assignee: se...@kde.org
          Reporter: kai.koe...@qt.io

I've openSUSE 42.1 with Qt 5.7.0, KDE Plasma 5.7.4 and KDE Frameworks 5.25.0
running on a Lenovo P50 laptop.

Whenever I connect a projector to the HDMI output my KDE session crashes.

Following processes create coredumps:
* /usr/lib64/libexec/drkonqi -platform xcb -display :0 --appname ksmserver
--appp
* /usr/bin/kactivitymanagerd start-daemon
* /usr/lib64/libexec/kf5/klauncher --fd=8
* /usr/lib64/libexec/kf5/kscreen_backend_launcher

But judging from the stack traces kscreen_backend_launcher crashes first, and
then the rest follows.

Stack trace for SIGSEGV in kscreen_backend_launcher:

#0  XRandRScreen::toKScreenScreen (this=0x191eea0) at
/usr/src/debug/libkscreen-5.7.4/backends/xrandr/xrandrscreen.cpp:67
#1  0x00007f50263a0cc1 in XRandRConfig::toKScreenConfig (this=0x191d660) at
/usr/src/debug/libkscreen-5.7.4/backends/xrandr/xrandrconfig.cpp:117
#2  0x00007f502639d9e0 in XRandR::config (this=<optimized out>) at
/usr/src/debug/libkscreen-5.7.4/backends/xrandr/xrandr.cpp:205
#3  0x0000000000404579 in BackendDBusWrapper::setConfig (this=0x1926f30,
configMap=...)
    at
/usr/src/debug/libkscreen-5.7.4/src/backendlauncher/backenddbuswrapper.cpp:87
#4  0x0000000000405854 in BackendAdaptor::setConfig (in0=..., this=<optimized
out>)
    at
/usr/src/debug/libkscreen-5.7.4/build/src/backendlauncher/backendadaptor.cpp:51
#5  BackendAdaptor::qt_static_metacall (_o=<optimized out>, _c=<optimized out>,
_id=<optimized out>, _a=0x7ffc0a5ee700)
    at
/usr/src/debug/libkscreen-5.7.4/build/src/backendlauncher/backendadaptor.moc:112
#6  0x0000000000405b43 in BackendAdaptor::qt_metacall (this=0x191e3e0,
_c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffc0a5ee700)
    at
/usr/src/debug/libkscreen-5.7.4/build/src/backendlauncher/backendadaptor.moc:155
#7  0x00007f5032ca1f9b in ?? () from /usr/lib64/libQt5DBus.so.5
#8  0x00007f5032ca6014 in ?? () from /usr/lib64/libQt5DBus.so.5
#9  0x00007f5032ca6870 in ?? () from /usr/lib64/libQt5DBus.so.5
#10 0x00007f5032ca8ebe in ?? () from /usr/lib64/libQt5DBus.so.5
#11 0x00007f5032153df6 in QObject::event(QEvent*) () from
/usr/lib64/libQt5Core.so.5
#12 0x00007f503212a6bc in QCoreApplication::notify(QObject*, QEvent*) () from
/usr/lib64/libQt5Core.so.5
#13 0x00007f503212a5f5 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib64/libQt5Core.so.5
#14 0x00007f503212c653 in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#15 0x00007f5032179713 in ?? () from /usr/lib64/libQt5Core.so.5
#16 0x00007f502f208c84 in g_main_context_dispatch () from
/usr/lib64/libglib-2.0.so.0
#17 0x00007f502f208ed8 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00007f502f208f7c in g_main_context_iteration () from
/usr/lib64/libglib-2.0.so.0
#19 0x00007f5032178f7b in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib64/libQt5Core.so.5
#20 0x00007f50321288cb in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib64/libQt5Core.so.5
#21 0x00007f50321306c6 in QCoreApplication::exec() () from
/usr/lib64/libQt5Core.so.5
#22 0x0000000000403542 in main (argc=1, argv=<optimized out>) at
/usr/src/debug/libkscreen-5.7.4/src/backendlauncher/main.cpp:41

The line that crashes is 67:

66          XCB::ScopedPointer<xcb_randr_get_screen_resources_reply_t>
screenResources(XRandR::screenResources());
67         
kscreenScreen->setMaxActiveOutputsCount(screenResources->num_crtcs);

So it looks to me like XRandR::screenResources() returns an invalid/null
pointer .

I'd be happy to help further debugging this, but am not sure how to proceed.
How do I attach e.g. a debugger early on during the login phase? Feel free to
reach out to me also on IRC (kkoehne, e.g. on freenode/ #qt-labs) if I could be
of any help.

Reproducible: Always

Steps to Reproduce:
1. Connect projector to HDMI input of laptop

Actual Results:  
KDE session crashes. If one connects the projector in the KDM login screen,
logging in fails.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to