After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 550817 - gnome-power-manager segfaults with low battery
gnome-power-manager segfaults with low battery
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.23.x
Other Linux
: Normal critical
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-09-04 10:40 UTC by Priit Laes (IRC: plaes)
Modified: 2008-10-15 07:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Proposed patch to change UINT->FLOAT (1.16 KB, patch)
2008-10-14 00:11 UTC, James Westby
none Details | Review

Description Priit Laes (IRC: plaes) 2008-09-04 10:40:02 UTC
Getting following crash in gnome-power-manager-2.3.91

(gdb) bt full
  • #0 gpm_cell_array_charge_low_cb
    at gpm-engine.c line 799
  • #1 IA__g_closure_invoke
    at gclosure.c line 767
  • #2 signal_emit_unlocked_R
    at gsignal.c line 3244
  • #3 IA__g_signal_emit_valist
    at gsignal.c line 2977
  • #4 IA__g_signal_emit
    at gsignal.c line 3034
  • #5 gpm_cell_array_collection_changed
    at gpm-cell-array.c line 787
  • #6 gpm_cell_array_add_device_id
    at gpm-cell-array.c line 842
  • #7 gpm_cell_array_coldplug
    at gpm-cell-array.c line 880
  • #8 gpm_cell_array_set_type
    at gpm-cell-array.c line 903
  • #9 gpm_engine_start
    at gpm-engine.c line 1027
  • #10 gpm_manager_init
    at gpm-manager.c line 1794
  • #11 IA__g_type_create_instance
    at gtype.c line 1674
  • #12 g_object_constructor
    at gobject.c line 1328
  • #13 IA__g_object_newv
    at gobject.c line 1205
  • #14 IA__g_object_new_valist
    at gobject.c line 1268
  • #15 IA__g_object_new
    at gobject.c line 1050
  • #16 gpm_manager_new
    at gpm-manager.c line 1858
  • #17 main
    at gpm-main.c line 238

Comment 1 Christopher Halse Rogers 2008-09-13 00:44:10 UTC
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%.
Comment 2 Joel Stanley 2008-10-08 01:40:13 UTC
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.
Comment 3 Rincebrain 2008-10-13 21:32:49 UTC
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)
Comment 4 James Westby 2008-10-14 00:09:23 UTC
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
Comment 5 James Westby 2008-10-14 00:11:00 UTC
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.
Comment 6 Richard Hughes 2008-10-14 07:31:23 UTC
James, can you commit to master and 2-24 please. Thanks.
Comment 7 James Westby 2008-10-14 09:44:43 UTC
Hi Richard,

I would happily if I had commit access.

Thanks,

James
Comment 8 Richard Hughes 2008-10-15 07:38:31 UTC
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.