tag 422420 + patch thanks On Sat, May 05, 2007 at 09:38:10PM +0200, Michael Biebl wrote: > Pierre Habouzit wrote: > > Package: kpowersave > > Version: 0.7.2-2 > > Severity: grave > > Justification: renders package unusable > > > > > > When kpowersave is launched, it just crash. 0.6 works correctly. > > > > Hi Pierre, > > could you please send me a backtrace?
Okay, I have a debug build now, here is the useful backtrace:
(gdb) r --nofork --nocrashhandler
Starting program: /usr/bin/kpowersave --nofork --nocrashhandler
[Thread debugging using libthread_db enabled]
[New Thread 47593028352624 (LWP 9927)]
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47593028352624 (LWP 9927)]
0x00002b49187e0430 in strcmp () from /lib/libc.so.6
(gdb) bt
#0 0x00002b49187e0430 in strcmp () from /lib/libc.so.6
#1 0x00002b4917d9fe97 in kpowersave::setSchemeSettings (this=0x669690) at
/tmp/buildd/kpowersave-0.7.2/./src/kpowersave.cpp:1607
#2 0x00002b4917da6109 in kpowersave (this=0x669690, force_acpi_check=false) at
/tmp/buildd/kpowersave-0.7.2/./src/kpowersave.cpp:138
#3 0x00002b4917da70a2 in kdemain (argc=<value optimized out>, argv=<value
optimized out>) at /tmp/buildd/kpowersave-0.7.2/./src/main.cpp:84
#4 0x00002b49187878e4 in __libc_start_main () from /lib/libc.so.6
#5 0x0000000000400519 in _start ()
And obviously this is wrong:
} else if ((!strcmp(getenv("DESKTOP_SESSION"), "gnome")) &&
(display->checkScreenSaverStatus() == 11)) {
I wonder how this can ever work for anybody :) Maybe that's because
I'm a ion3 user and that it does not defines DESKTOP_SESSION :)
attached is a patch.
--
·O· Pierre Habouzit
··O [EMAIL PROTECTED]
OOO http://www.madism.org
diff -Nur kpowersave-0.7.2/src/kpowersave.cpp kpowersave-0.7.2.new/src/kpowersave.cpp
--- kpowersave-0.7.2/src/kpowersave.cpp 2007-05-08 16:03:01.000000000 +0200
+++ kpowersave-0.7.2.new/src/kpowersave.cpp 2007-05-08 16:03:53.000000000 +0200
@@ -1604,7 +1604,7 @@
// Maybe nothing ?!
}
}
- } else if ((!strcmp(getenv("DESKTOP_SESSION"), "gnome")) && (display->checkScreenSaverStatus() == 11)) {
+ } else if ((getenv("DESKTOP_SESSION") && !strcmp(getenv("DESKTOP_SESSION"), "gnome")) && (display->checkScreenSaverStatus() == 11)) {
// use this to set XScreensaver back to default settings this should
// also cover the DPMS settings for GNOME/XScreensaver
pgpiGgDKIyFon.pgp
Description: PGP signature

