Bug#650510: gnome-power-manager: Failed assertion when battery not present
Tomaz Solc
tomaz.solc at tablix.org
Wed Nov 30 11:29:07 UTC 2011
Package: gnome-power-manager
Version: 2.32.0-2
Severity: normal
Tags: patch
Hi
Gnome-power-manager crashes when I try to view the "Details" pane in the "Power Statistics" window for a battery that is not currently installed (BAT1).
Console says:
ERROR:gpm-upower.c:656:gpm_device_state_to_localised_string: code should not be reached
gpm_device_state_to_localised_string() doesn't seem to handle the "Unknown" state returned by libupower. I'm attaching a simple patch that adds that case and fixes the crash.
Best regards
Tomaž Šolc
-- Package-specific info:
Distro version: 6.0.3
Kernel version: 2.6.39-bpo.2-amd64
g-p-m version: 2.32.0
HAL version: System manufacturer: missing
System version: missing
System product: missing
AC adapter present: no
Battery present: no
Laptop panel present: no
CPU scaling present: no
Battery Information:
UPower data:
Device: /org/freedesktop/UPower/devices/line_power_AC
native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC
power supply: yes
updated: Wed Nov 30 09:37:04 2011 (9966 seconds ago)
has history: no
has statistics: no
line-power
online: yes
Device: /org/freedesktop/UPower/devices/battery_BAT0
native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
vendor: Hewlett-Packard
model: Primary
serial: 00015 2011/03/15
power supply: yes
updated: Wed Nov 30 11:08:28 2011 (4482 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: fully-charged
energy: 54.9072 Wh
energy-empty: 0 Wh
energy-full: 54.9072 Wh
energy-full-design: 54.9072 Wh
energy-rate: 0 W
voltage: 12.564 V
percentage: 100%
capacity: 100%
technology: lithium-ion
Device: /org/freedesktop/UPower/devices/battery_BAT1
native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:01/power_supply/BAT1
power supply: no
updated: Wed Nov 30 12:22:56 2011 (14 seconds ago)
has history: no
has statistics: no
battery
present: no
rechargeable: no
state: unknown
energy: 0 Wh
energy-empty: 0 Wh
energy-full: 0 Wh
energy-full-design: 0 Wh
energy-rate: 0 W
percentage: 0%
Daemon:
daemon-version: 0.9.5
can-suspend: yes
can-hibernate no
on-battery: no
on-low-battery: no
lid-is-closed: no
lid-is-present: yes
GNOME Power Manager Process Information:
HAL Process Information:
-- System Information:
Debian Release: 6.0.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.39-bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gnome-power-manager depends on:
ii consolekit 0.4.1-4 framework for defining and trackin
ii dbus-x11 1.2.24-4+squeeze1 simple interprocess messaging syst
ii gconf2 2.28.1-6 GNOME configuration database syste
ii libbonobo2-0 2.24.3-1 Bonobo CORBA interfaces library
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libcairo2 1.10.2-6~bpo60+1 The Cairo 2D vector graphics libra
ii libcanberra-gtk0 0.24-1 Gtk+ helper for playing widget eve
ii libcanberra0 0.24-1 a simple abstract interface for pl
ii libdbus-1-3 1.2.24-4+squeeze1 simple interprocess messaging syst
ii libdbus-glib-1-2 0.88-2.1 simple interprocess messaging syst
ii libgconf2-4 2.28.1-6 GNOME configuration database syste
ii libglib2.0-0 2.24.2-1 The GLib library of C routines
ii libgnome-keyring0 2.30.1-1 GNOME keyring services library
ii libgtk2.0-0 2.20.1-2 The GTK+ graphical user interface
ii libnotify1 [libnotify1 0.5.0-2 sends desktop notifications to a n
ii libpanel-applet2-0 2.30.2-2 library for GNOME Panel applets
ii libpango1.0-0 1.28.3-1+squeeze2 Layout and rendering of internatio
ii libunique-1.0-0 1.1.6-1.1 Library for writing single instanc
ii libupower-glib1 0.9.5-5 abstraction for power management -
ii libx11-6 2:1.3.3-4 X11 client-side library
ii libxext6 2:1.1.2-1 X11 miscellaneous extension librar
ii libxrandr2 2:1.3.0-3 X11 RandR extension library
ii notification-daemon 0.5.0-2 daemon to displays passive pop-up
ii upower 0.9.5-5 abstraction for power management
Versions of packages gnome-power-manager recommends:
ii udisks 1.0.1+git20100614-3 abstraction for enumerating block
Versions of packages gnome-power-manager suggests:
ii policykit-1 0.96-4+squeeze1 framework for managing administrat
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZZ-device-state-unknown-tomaz.patch
Type: text/x-diff
Size: 582 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20111130/880f1687/attachment-0001.patch>
More information about the pkg-gnome-maintainers
mailing list