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 671268 - Segfault in libpower.so after ~10 secs without user input
Segfault in libpower.so after ~10 secs without user input
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-03 19:13 UTC by wizwiz50
Modified: 2012-03-05 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description wizwiz50 2012-03-03 19:13:08 UTC
I get segfault because of a NULL pointer in gsd-power-manager.c:2676.
The function backlight_get_abs() returns -13 because of backlight_helper_get_value(). The error pointer didn't get initialized but it is used just after :

g_warning ("failed to get existing backlight: %s", error->message);

Thank you
Comment 1 Matthias Clasen 2012-03-04 20:49:20 UTC
What version of gnome-settings-daemon is this ? I don't see that warning message in the current sources.
Comment 2 wizwiz50 2012-03-04 21:34:53 UTC
I'm on Ubuntu 11.10, it's 3-2-2
Comment 3 Bastien Nocera 2012-03-05 15:18:02 UTC
Matthias:
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/gsd-power-manager.c?h=gnome-3-2&id=b3f969f8b8391e3c3f30bb5d54fe0cca2ddd4061#n2674

I added another check to backlight_helper_get_value(). Let me know if this fixes the problem. Would be nice to fix it in the helper itself though.


commit 0fc947c590ec40f492af16cef5e3de7775ba08ab
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Mar 5 15:14:39 2012 +0000

    power: Add more error checks
    
    Should fix crasher in most unlikely of circumstances. Like the
    kernel giving us crap data.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671268
Comment 4 Bastien Nocera 2012-03-05 15:28:12 UTC
You can also run "gsd-backlight-helper" by hand after this commit:
http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=305057ac831b357a03bb3f244059048551321b71

So you can check how gsd-backlight-helper is giving out wrong data.
Comment 5 wizwiz50 2012-03-05 21:11:40 UTC
you have fixed it, thank you. gsd-backlight-helper is returning -13 as I was expecting.