[gpm] Segfault on button-pressed
- From: "Pascal Terjan" <pterjan gmail com>
- To: gnome-power-manager-list gnome org
- Subject: [gpm] Segfault on button-pressed
- Date: Tue, 21 Nov 2006 21:00:55 +0100
Hello,
Today when suspending I got a crash in :
#4 0x0804f5a4 in emit_button_pressed (monitor=0x807d168,
udi=0x80b5a88 "/org/freedesktop/Hal/devices/acpi_LID", details=)
at gpm-hal-monitor.c:193
button_name = 0x0
value = 1
__PRETTY_FUNCTION__ = "emit_button_pressed"
__FUNCTION__ = "emit_button_pressed"
So it looks like Hal informed us that the lid button was pressed but
then could not give us the button name. I think this is a race when
the button is pressed while hal is shutting down.
Here is a small patch that would avoid the crash.
Maybe testing the return of gpm_hal_device_get_string would be nicer.
? attachment.cgi?id=75310&action=view
? gpm.2.log
? gpm.log
? data/gnome-power-statistics.desktop
? src/gpm-interface-manager.h
? src/gpm-interface-statistics.h
Index: src/gpm-hal-monitor.c
===================================================================
RCS file: /cvs/gnome/gnome-power-manager/src/Attic/gpm-hal-monitor.c,v
retrieving revision 1.28.2.1
diff -u -r1.28.2.1 gpm-hal-monitor.c
--- src/gpm-hal-monitor.c 14 Sep 2006 09:37:55 -0000 1.28.2.1
+++ src/gpm-hal-monitor.c 21 Nov 2006 19:58:42 -0000
@@ -187,6 +187,8 @@
button_name = g_strdup (details);
}
+ g_return_if_fail (button_name != NULL);
+
/* Buttons without state should default to true. */
value = TRUE;
/* we need to get the button state for lid buttons */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]