[Powerdevil] [Bug 470484] Powerdevil crashes multiple times during screen sleep

2023-06-02 Thread ratijas
https://bugs.kde.org/show_bug.cgi?id=470484

ratijas  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  ---
here,

> #5  QtWayland::org_kde_kwin_dpms::set(unsigned int) (mode=,
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 *> )
> {
> // ...
> 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 *>(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.

[Powerdevil] [Bug 470484] Powerdevil crashes multiple times during screen sleep

2023-06-02 Thread MScattolin
https://bugs.kde.org/show_bug.cgi?id=470484

--- Comment #2 from MScattolin  ---
(In reply to Nicolas Fella from comment #1)
> Can you please follow
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
> to get a proper backtrace? The one you pasted is missing demangling and
> debug symbols to be fully useful

Hello, sure, got the following from the latest coredump:

#0  __GI___pthread_sigmask (how=1, newmask=, oldmask=0x0) at
pthread_sigmask.c:43
#1  0x7fd6e264fcad in __GI___sigprocmask (how=,
set=, oset=) at
../sysdeps/unix/sysv/linux/sigprocmask.c:25
#2  0x7fd6e3c5520b in KCrash::setCrashHandler(void (*)(int))
(handler=handler@entry=0x0) at
/usr/src/debug/kcrash/kcrash-5.106.0/src/kcrash.cpp:414
#3  0x7fd6e3c57816 in KCrash::defaultCrashHandler(int) (sig=11) at
/usr/src/debug/kcrash/kcrash-5.106.0/src/kcrash.cpp:625
#4  0x7fd6e264fab0 in  () at /usr/lib/libc.so.6
#5  QtWayland::org_kde_kwin_dpms::set(unsigned int) (mode=,
this=0x10) at /usr/src/debug/libkscreen/build/src/libdpms/qwayland-dpms.cpp:126
#6  WaylandDpmsHelper::trigger(KScreen::Dpms::Mode, QList const&)
(this=0x559b6a7b7380, mode=, screens=)
at
/usr/src/debug/libkscreen/libkscreen-5.27.5/src/libdpms/waylanddpmshelper.cpp:191
#7  0x7fd6dc2ffcc4 in KScreen::Dpms::switchMode(KScreen::Dpms::Mode,
QList const&)
(this=, mode=mode@entry=KScreen::Dpms::Off, screens=...) at
/usr/src/debug/libkscreen/libkscreen-5.27.5/src/libdpms/dpms.cpp:40
#8  0x7fd6dc30a6ca in PowerDevil::BundledActions::DPMS::onIdleTimeout(int)
(this=, msec=)
at
/usr/src/debug/powerdevil/powerdevil-5.27.5/daemon/actions/bundled/dpms.cpp:135
#9  0x7fd6e3c22a51 in PowerDevil::Core::onKIdleTimeoutReached(int, int)
(this=0x559b6a7606b0, identifier=1, msec=150)
at
/usr/src/debug/powerdevil/powerdevil-5.27.5/daemon/powerdevilcore.cpp:840
#10 0x7fd6e2ed01a3 in doActivate(QObject*, int, void**)
(sender=0x559b6a759570, signal_index=5, argv=0x7ffc3e8201a0) at
kernel/qobject.cpp:3935
#11 0x7fd6e31c433d in KIdleTime::timeoutReached(int, int)
(this=this@entry=0x559b6a759570, _t1=, _t1@entry=1,
_t2=, 
_t2@entry=150) at
/usr/src/debug/kidletime/build/src/KF5IdleTime_autogen/include/moc_kidletime.cpp:195
#12 0x7fd6e31c4ee1 in KIdleTimePrivate::timeoutReached(int) (msec=150,
this=)
at /usr/src/debug/kidletime/kidletime-5.106.0/src/kidletime.cpp:297
#13 operator() (msec=150, __closure=) at
/usr/src/debug/kidletime/kidletime-5.106.0/src/kidletime.cpp:88
#14 QtPrivate::FunctorCall, QtPrivate::List,
void, KIdleTime::KIdleTime():: >::call
(arg=, f=) at
/usr/include/qt/QtCore/qobjectdefs_impl.h:146
#15 QtPrivate::Functor,
1>::call, void> (arg=, f=)
at /usr/include/qt/QtCore/qobjectdefs_impl.h:256
#16 QtPrivate::QFunctorSlotObject, 1,
QtPrivate::List, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *,
void **, bool *) (which=, this_=, r=, a=, ret=)
at /usr/include/qt/QtCore/qobjectdefs_impl.h:443
#17 0x7fd6e2ecffe7 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
(a=0x7ffc3e8202f0, r=, this=0x559b6a7b2c30, this=, r=, a=)
at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate(QObject*, int, void**) (sender=0x559b6a81b3f0,
signal_index=4, argv=0x7ffc3e8202f0) at kernel/qobject.cpp:3923
#19 0x7fd6e31c4226 in AbstractSystemPoller::timeoutReached(int)
(this=, _t1=)
at
/usr/src/debug/kidletime/build/src/KF5IdleTime_autogen/EWIEGA46WW/moc_abstractsystempoller.cpp:189
#20 0x7fd6e2ecffe7 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
(a=0x7ffc3e8203a0, r=, this=0x559b6a76c5b0, this=, r=, a=)
at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#21 doActivate(QObject*, int, void**) (sender=0x7fd6d8026640,
signal_index=3, argv=0x7ffc3e8203a0) at kernel/qobject.cpp:3923
#22 0x7fd6e3c6b4f6 in  () at /usr/lib/libffi.so.8
#23 0x7fd6e3c67f5e in  () at /usr/lib/libffi.so.8
#24 0x7fd6e3c6ab73 in ffi_call () at /usr/lib/libffi.so.8
#25 0x7fd6e3c76645 in wl_closure_invoke
(closure=closure@entry=0x7fd6d0001980, target=, 
target@entry=0x559b6a848860, opcode=opcode@entry=0, data=,
flags=1) at ../wayland-1.22.0/src/connection.c:1025
#26 0x7fd6e3c76e73 in dispatch_event (display=display@entry=0x559b6a753100,
queue=0x559b6a7531f0) at ../wayland-1.22.0/src/wayland-client.c:1631
#27 0x7fd6e3c7713c in dispatch_queue (queue=0x559b6a7531f0,
display=0x559b6a753100) at ../wayland-1.22.0/src/wayland-client.c:1777
#28 wl_display_dispatch_queue_pending (display=0x559b6a753100,
queue=0x559b6a7531f0) at ../wayland-1.22.0/src/wayland-client.c:2019
#29 0x7fd6dd6efc06 in QtWaylandClient::QWaylandDisplay::flushRequests()
(this=)
at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddisplay.cpp:255
#30 0x7fd6e2ec2834 in QObject::event(QEvent*) (this=0x559b6a752fa0,
e=0x7fd6d0001b90) at kernel/qobject.cpp:1347
#31 

[Powerdevil] [Bug 470484] Powerdevil crashes multiple times during screen sleep

2023-06-01 Thread Nicolas Fella
https://bugs.kde.org/show_bug.cgi?id=470484

Nicolas Fella  changed:

   What|Removed |Added

 CC||nicolas.fe...@gmx.de

--- Comment #1 from Nicolas Fella  ---
Can you please follow
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
to get a proper backtrace? The one you pasted is missing demangling and debug
symbols to be fully useful

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

[Powerdevil] [Bug 470484] Powerdevil crashes multiple times during screen sleep

2023-05-31 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=470484

Bug Janitor Service  changed:

   What|Removed |Added

   Severity|normal  |crash

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