Hide Forgot
on my machine with two batteries gpm always segfaults when it runs with no power cable plugged in. 24 [lennart@epsilon] ~/projects/systemd (master $)$ lme gdb --args gnome-power-manager GNU gdb (GDB) Fedora (7.2.50.20110206-18.fc15) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/gnome-power-manager...Reading symbols from /usr/lib/debug/usr/bin/gnome-power-manager.debug...done. done. (gdb) r Starting program: /usr/bin/gnome-power-manager [Thread debugging using libthread_db enabled] [New Thread 0x7ffff2138700 (LWP 20656)] [New Thread 0x7ffff12e6700 (LWP 20657)] [New Thread 0x7ffff0ae5700 (LWP 20658)] (gnome-power-manager:20653): GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed Program received signal SIGSEGV, Segmentation fault. 0x00000038b647cde2 in g_variant_is_trusted (value=0x0) at gvariant-core.c:600 600 return (value->state & STATE_TRUSTED) != 0; Missing separate debuginfos, use: debuginfo-install dconf-0.7.2-1.x86_64 expat-2.0.1-10.fc13.x86_64 fontconfig-2.8.0-2.fc14.x86_64 freetype-2.4.4-1.fc15.x86_64 gnome-themes-standard-2.91.8-3.fc15.x86_64 libXau-1.0.6-1.fc14.x86_64 libXcomposite-0.4.3-1.fc15.x86_64 libXcursor-1.1.11-2.fc15.x86_64 libXdamage-1.1.3-1.fc14.x86_64 libXfixes-4.0.5-1.fc14.x86_64 libXi-1.4.1-1.fc15.x86_64 libXinerama-1.1.1-1.fc15.x86_64 libXrender-0.9.6-1.fc14.x86_64 libcroco-0.6.2-5.fc15.x86_64 libogg-1.2.2-2.fc15.x86_64 libpng-1.2.44-2.fc15.x86_64 libtdb-1.2.9-8.fc15.x86_64 libtool-ltdl-2.4-3.fc15.x86_64 libvorbis-1.3.1-2.fc14.x86_64 libxcb-1.7-1.fc15.x86_64 libxml2-2.7.8-4.fc15.x86_64 nss-softokn-freebl-3.12.9-2.fc15.x86_64 pixman-0.20.2-1.fc15.x86_64 (gdb) bt full #0 0x00000038b647cde2 in g_variant_is_trusted (value=0x0) at gvariant-core.c:600 No locals. #1 0x00000038b647a416 in g_variant_builder_add_value (builder=0x7fffffffd8b0, value=0x0) at gvariant.c:3079 __PRETTY_FUNCTION__ = "g_variant_builder_add_value" #2 0x00000038b647bc5a in g_variant_valist_new (str=0x7fffffffd968, app=0x7fffffffd998) at gvariant.c:4075 b = {x = {0, 7634624, 0, 0, 0, 18446744073709551615, 7657760, 8, 0, 2, 1033660112, 0, 0, 0, 0, 0}} __PRETTY_FUNCTION__ = "g_variant_valist_new" #3 0x00000038b647bfd7 in g_variant_new_va (format_string=0x41f1dd "usdut)", endptr=0x0, app=0x7fffffffd998) at gvariant.c:4230 value = <optimized out> #4 0x00000038b647c0f8 in g_variant_new (format_string=0x41f1db "(susdut)") at gvariant.c:4170 value = <optimized out> ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fffffffda70, reg_save_area = 0x7fffffffd9b0}} __PRETTY_FUNCTION__ = "g_variant_new" kind = UP_DEVICE_KIND_BATTERY state = UP_DEVICE_STATE_DISCHARGING percentage = 98.94722240474259 time_state = 20303 time_empty = 20303 time_full = 0 value = <optimized out> icon = <optimized out> device_icon = 0x71a820 ". GThemedIcon gpm-battery-100 battery-full " #6 0x0000000000410ab8 in gpm_manager_dbus_method_call (connection=<optimized out>, sender=<optimized out>, object_path=<optimized out>, interface_name=<optimized out>, method_name=0x7fffec006760 "GetPrimaryDevice", parameters=<optimized out>, invocation=0x664ea0 [GDBusMethodInvocation], user_data=0x6b6870) at gpm-manager.c:2088 manager = 0x6b6870 [GpmManager] device = <optimized out> value = 0x0 tuple = 0x0 array = 0x0 i = <optimized out> builder = <optimized out> #7 0x00000038b7cae81d in call_in_idle_cb (user_data=<optimized out>) at gdbusconnection.c:4424 invocation = 0x664ea0 [GDBusMethodInvocation] vtable = <optimized out> registration_id = <optimized out> subtree_registration_id = <optimized out> __PRETTY_FUNCTION__ = "call_in_idle_cb" #8 0x00000038b6442b7d in g_main_dispatch (context=0x657270) at gmain.c:2440 dispatch = 0x38b643eb30 <g_idle_dispatch> was_in_call = 0 user_data = 0x664ea0 callback = 0x38b7cae6d0 <call_in_idle_cb> cb_funcs = 0x38b6715c30 cb_data = 0x7fffec0080e0 current_source_link = {data = 0x7fffec002e00, next = 0x0} need_destroy = <optimized out> source = 0x7fffec002e00 current = 0x663400 i = <optimized out> #9 g_main_context_dispatch (context=0x657270) at gmain.c:3013 No locals. #10 0x00000038b6443358 in g_main_context_iterate (context=0x657270, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3091 max_priority = 0 timeout = 0 some_ready = 1 nfds = 7 allocated_nfds = <optimized out> fds = <optimized out> #11 0x00000038b644399a in g_main_loop_run (loop=0x6b1b70) at gmain.c:3299 __PRETTY_FUNCTION__ = "g_main_loop_run" #12 0x0000000000408476 in main (argc=1, argv=0x7fffffffdef8) at gpm-main.c:304 system_connection = 0x661840 [GDBusConnection] version = 0 timed_exit = 0 immediate_exit = 0 manager = 0x6b6870 [GpmManager] error = 0x0 ---Type <return> to continue, or q <return> to quit--- context = 0x638f20 timer_id = <optimized out> options = {{long_name = 0x41e3f5 "version", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffddd4, description = 0x41e4b8 "Show version of installed program and exit", arg_description = 0x0}, { long_name = 0x41e4ab "timed-exit", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffddd8, description = 0x41e4e8 "Exit after a small delay (for debugging)", arg_description = 0x0}, {long_name = 0x41e3fd "immediate-exit", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffdddc, description = 0x41e518 "Exit after the manager has loaded (for debugging)", arg_description = 0x0}, {long_name = 0x0, short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}} (gdb) 27 [lennart@epsilon] ~/projects/systemd (master $)$ rpm -qa gnome-power-manager gnome-power-manager-2.91.5-2.fc15.x86_64
up_device_get_object_path (device) must be returning NULL, which means the composite device doesn't have a object path. In this instance, I'm not sure what to return as the object path, but I suspect "/org/gnome/PowerManager" is the sane thing to do as we can't return a "nothing" value in DBus yet. For the moment, I've committed this in git master. Any chance you could give it a whirl in jhbuild before I build this for Fedora? Thanks dude. commit fe3a80eca02f7b8ffcc77420c9f841c16c69ba06 Author: Richard Hughes <richard> Date: Wed Feb 9 09:12:38 2011 +0000 Never return NULL for the object path in GetPrimaryDevice for the composite battery device. Fixes rh#676055
I tested this for you on IRC a while back, and it seems to have worked. I'd be really happy if you could upload a fixed version to F15. I want my battery status back!