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

            Bug ID: 386490
           Summary: Crash in Atomic DRM setting
           Product: kwin
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: k...@davidedmundson.co.uk
  Target Milestone: ---

(reported by Fabian, posting on bugzilla, as I need input from Roman)

#0  KWin::DrmPlane::atomicPopulate (this=0x5555558bb3b0, req=0x55555629f2e0) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/platforms/drm/drm_object_plane.cpp:133
#1  0x00007fffdce6ef63 in KWin::DrmOutput::doAtomicCommit
(this=this@entry=0x5555558cd1a0,
mode=mode@entry=KWin::DrmOutput::AtomicCommitMode::Test)
    at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/platforms/drm/drm_output.cpp:955
#2  0x00007fffdce70609 in KWin::DrmOutput::presentAtomically
(this=0x5555558cd1a0, buffer=<optimized out>) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/platforms/drm/drm_output.cpp:832
#3  0x00007fffdce62c5c in KWin::DrmBackend::present (this=0x5555557e9610,
buffer=0x55555617fe40, output=<optimized out>) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/platforms/drm/drm_backend.cpp:576
#4  0x00007fffdce761bd in KWin::EglGbmBackend::presentOnOutput
(this=0x5555558c5ec0, o=...) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/platforms/drm/egl_gbm_backend.cpp:268
#5  0x00007fffdce77458 in KWin::EglGbmBackend::endRenderingFrameForScreen
(this=0x5555558c5ec0, screenId=0, renderedRegion=..., damagedRegion=...)
    at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/platforms/drm/egl_gbm_backend.cpp:338
#6  0x00007fffd69dad99 in KWin::SceneOpenGL::paint
(this=this@entry=0x5555558750d0, damage=..., toplevels=...) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/plugins/scenes/opengl/scene_opengl.cpp:681
#7  0x00007ffff7a57662 in KWin::Compositor::performCompositing
(this=this@entry=0x55555587ab10) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/composite.cpp:740
#8  0x00007ffff7a57dee in KWin::Compositor::startupWithWorkspace
(this=0x55555587ab10) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/composite.cpp:351
#9  0x00007ffff5a11fec in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib64/libQt5Core.so.5
#10 0x0000555555560447 in KWin::ApplicationWayland::continueStartupWithX
(this=0x7fffffffdf40) at
/usr/src/debug/kwin-5.11.90git.20171102T195914~77b5c3caa/main_wayland.cpp:258
#11 0x00007ffff5a128d2 in QObject::event(QEvent*) () from
/usr/lib64/libQt5Core.so.5


Crash is (in hindsight) obvious.


drm_object.cpp:44
init_props()
    for (unsigned int i = 0; i < properties->count_props; ++i) {
drmModePropertyRes *prop = drmModeGetProperty(m_backend->fd(),
properties->props[i]);
        if (!prop) {
            continue;
        }
        if (prop->name == m_propsNames[n]) {
            qCDebug(KWIN_DRM).nospace() << m_id << ": " << prop->name << "' (id
" << prop->prop_id
                              << "): " << properties->prop_values[i];
            m_props[n] = new Property(prop, properties->prop_values[i],
enumNames);
        }
}


we don't always populate m_prop[i] with a valid object if our names don't
match.

yet remaining code does:

for() {
m_props[i]->something

everywhere. Both in the trace and in a bunch of other places.

I can guard them all for being null. Roman, is that the right approach?

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

Reply via email to