Loïc Minier wrote:
On Thu, May 22, 2008, Avery Fay wrote:
Hopefully better backtrace follow:
*** glibc detected *** /usr/bin/gnome-power-manager: free(): invalid
I think the backtrace is probably useless on this free(), it's likely
some memory corruption. Instead, try running
/usr/bin/gnome-power-manager: in valgrind and look for invalid free()s.
I took a look at the source. It's really just trying to free memory that
was never allocated. I've attached a fix. On the other hand, my machine
still doesn't shutdown properly. Perhaps the whole UPS code path hasn't
been tested yet?
--- gnome-power-manager-2.22.1-orig/src/gpm-manager.c 2008-05-23 19:07:49.000000000 -0400
+++ gnome-power-manager-2.22.1-fixed/src/gpm-manager.c 2008-05-23 18:35:35.000000000 -0400
@@ -1586,17 +1586,17 @@
/* use different text for different actions */
if (strcmp (action, ACTION_NOTHING) == 0) {
- message = _("The UPS is below the critical level and "
+ message = g_strdup (_("The UPS is below the critical level and "
"this computer will <b>power-off</b> when the "
- "UPS becomes completely empty.");
+ "UPS becomes completely empty."));
} else if (strcmp (action, ACTION_HIBERNATE) == 0) {
- message = _("The UPS is below the critical level and "
- "this computer is about to hibernate.");
+ message = g_strdup (_("The UPS is below the critical level and "
+ "this computer is about to hibernate."));
} else if (strcmp (action, ACTION_SHUTDOWN) == 0) {
- message = _("The UPS is below the critical level and "
- "this computer is about to shutdown.");
+ message = g_strdup (_("The UPS is below the critical level and "
+ "this computer is about to shutdown."));
}
g_free (action);