https://bugs.kde.org/show_bug.cgi?id=470484
ratijas <m...@ratijas.tk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleix...@kde.org, | |vlad.zahorod...@kde.org, | |xaver.h...@gmail.com Status|REPORTED |CONFIRMED Ever confirmed|0 |1 --- Comment #3 from ratijas <m...@ratijas.tk> --- here, > #5 QtWayland::org_kde_kwin_dpms::set(unsigned int) (mode=<optimized out>, this=0x10) at /usr/src/debug/libkscreen/build/src/libdpms/qwayland-dpms.cpp:126 `this` is a null pointer, although incremented by 0x10 probably to account for nested object layout within inheritance hierarchy of C++: > class Dpms : public QObject, public QtWayland::org_kde_kwin_dpms Perhaps, this call should be guarded? > void WaylandDpmsHelper::trigger(KScreen::Dpms::Mode mode, const QList<QScreen > *> &screens) > { > // ... > for (auto screen : screens) { > auto dpms = m_dpmsManager->fetch(screen); > dpms->set(level); > } Because having an output per se does not seem to guarantee the existence of a Dpms object available for fetch: > Dpms *fetch(QScreen *screen) > { > return m_dpmsPerScreen.value(screen); > } > > private: > void addScreen(QScreen *screen) > { > // We can't rely on checking the wl_output being null yet > // https://codereview.qt-project.org/c/qt/qtwayland/+/464669 > const bool fake = screen->geometry().isEmpty() || > screen->name().isEmpty(); > if (fake) { > return; > } > > QPlatformNativeInterface *native = qGuiApp->platformNativeInterface(); > wl_output *output = reinterpret_cast<wl_output > *>(native->nativeResourceForScreen(QByteArrayLiteral("output"), screen)); > if (output) { > m_dpmsPerScreen[screen] = new Dpms(get(output), m_dpms, screen); > } > } As you can see there are several conditions under which `m_dpmsPerScreen` hash map would be left without a value for some given screen. -- You are receiving this mail because: You are watching all bug changes.