GNOME Bugzilla – Bug 550817
gnome-power-manager segfaults with low battery
Last modified: 2008-10-15 07:38:31 UTC
Getting following crash in gnome-power-manager-2.3.91 (gdb) bt full
+ Trace 206312
Also occurs on Ubuntu with 2.23.91 (see https://bugs.edge.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/269083 ). This occurs at 25% battery for me. It's apparently not triggered by hitting 25%, because g-p-m will segfault on startup with the same backtrace if I start it when the battery is <= 25%.
Joakim has posted some additional information in the Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/269083/comments/11 https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/269083/comments/12 It appears to be pointer issue happening on x86_64 platforms.
FWIW - 2.24.0 vanilla on Ubuntu Intrepid triggers this bug. (vanilla meaning "I grabbed the .orig.tar.gz from ubuntu and compiled it without applying any patches using ./configure && make -j5 && make install" after removing the ubuntu package)
Hi, I think I have found the problem. When unit->percentage was changed to be a float only the percent-changed signal had it's signature changed from UINT to FLOAT. The charge-action, charge-low and charge-critical signals didn't. Thanks, James
Created attachment 120541 [details] [review] Proposed patch to change UINT->FLOAT I also moved away from gpm_closure, as that is what other code seemed to be doing, and the FLOAT variant didn't exist for the former.
James, can you commit to master and 2-24 please. Thanks.
Hi Richard, I would happily if I had commit access. Thanks, James
2008-10-15 Richard Hughes <richard@hughsie.com> * src/gpm-cell-array.c: (gpm_cell_array_class_init): Fix segfault with low battery. Original patch from James Westby, many thanks.