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 598221 - GPM crashes when plugging in/out AC
GPM crashes when plugging in/out AC
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.28.x
Other Linux
: Normal critical
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-10-12 23:32 UTC by Scott Howard
Modified: 2009-10-14 08:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debian quilt-style patch to fix crash on AC plug in (2.37 KB, patch)
2009-10-13 14:50 UTC, Scott Howard
none Details | Review

Description Scott Howard 2009-10-12 23:32:13 UTC
Originally reported:
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/447304

Summary:
"[I] was moving the computer and puled out the power cable and when I sit down the power manager informed me that it had crashed."

Launchpad has received at least one duplicate, and it seems to be repeatable.

Stack trace:

  • #0 gpm_disks_set_spindown_timeout
    at gpm-disks.c line 101
  • #1 gpm_manager_client_changed_cb
    at gpm-manager.c line 851
  • #2 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 dkp_client_changed_cb
    at dkp-client.c line 472
  • #8 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #9 marshal_dbus_message_to_g_marshaller
    at dbus-gproxy.c line 1680
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #14 dbus_g_proxy_manager_filter
    at dbus-gproxy.c line 1733
  • #15 dbus_connection_dispatch
    at dbus-connection.c line 4444
  • #16 message_queue_dispatch
    at dbus-gmain.c line 101
  • #17 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #18 ??
    from /lib/libglib-2.0.so.0
  • #19 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #20 main
    at gpm-main.c line 276

Comment 1 Scott Howard 2009-10-12 23:33:41 UTC
gnome-power-bugreport.sh output is here:

http://launchpadlibrarian.net/33387185/gnome-power-bugreport.txt
Comment 2 Richard Hughes 2009-10-13 09:14:33 UTC
This looks like a problem in dbus-glib:

/* set spindown timeouts */
ret = dbus_g_proxy_call (disks->priv->proxy, "DriveSetAllSpindownTimeouts", &error,
			 G_TYPE_INT, timeout,
			 G_TYPE_STRV, options,
			 G_TYPE_INVALID,
			 G_TYPE_STRING, disks->priv->cookie,
			 G_TYPE_INVALID);
if (!ret) {
        egg_warning ("failed to set spindown timeout: %s", error->message);
                                                                ^- GOES BANG
        g_error_free (error);
        goto out;
}

But in the docs:

dbus_g_proxy_call()...
Returns : FALSE if an error is set, TRUE otherwise.

So it's returning FALSE without setting ERROR non-NULL.
Comment 3 Scott Howard 2009-10-13 14:44:47 UTC
Thanks for looking at this, Richard. I found this, and think we're on to something:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541632
"By passing dbus_g_proxy_call an incorrect signature, we can cause
the function to fail but not provide any error message.  This isn't
helpful.  This patch causes it to set an error when demarshalling
a type that it's not expecting.  Instead of a NULL error, one instead
sees something like the following when the method returns a path
object but the client expected a string:"

I think we're passing "timeout" as a guint when it is expecting a gint according to its signature.

I made a patch for it and am testing it at:
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/447304


Does that make sense? I'll attach the patch next.
Comment 4 Scott Howard 2009-10-13 14:50:44 UTC
Created attachment 145359 [details] [review]
Debian quilt-style patch to fix crash on AC plug in

Here's the patch that should make "timeout" an int instead of uint.
Comment 5 Richard Hughes 2009-10-14 08:02:15 UTC
(In reply to comment #4)
> Created an attachment (id=145359) [details]
> Debian quilt-style patch to fix crash on AC plug in

Applied, thanks!