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 667913 - gcm-picker does not unlock sensor on error
gcm-picker does not unlock sensor on error
Status: RESOLVED FIXED
Product: gnome-color-manager
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-color-manager-maint
gnome-color-manager-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-14 14:00 UTC by kkaempf
Modified: 2012-01-16 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible fix, probably needs some cleanup from someone with GNOME coding experience ;-) (1.31 KB, patch)
2012-01-14 14:00 UTC, kkaempf
none Details | Review
Improved patch (898 bytes, patch)
2012-01-14 15:30 UTC, kkaempf
none Details | Review

Description kkaempf 2012-01-14 14:00:08 UTC
Created attachment 205262 [details] [review]
Possible fix, probably needs some cleanup from someone with GNOME coding experience ;-)

(Experienced with colorhug)

Running gcm-picker from console with the sensor off-screen, I get


(gcm-picker:4797): Gcm-WARNING **: failed to get sample: Failed to GetSample: GDBus.Error:org.freedesktop.ColorManager.Failed: failed to sample: Invalid read: retval=0x04 [Underflow of sensor] cmd=0x23 (expected 0x23 [take-reading-xyz]) len=2 (expected 14)

which is fine since the sensor was off-screen. However, subsequent samples are not possible due to

(gcm-picker:4797): Gcm-WARNING **: failed to lock: Failed to Lock: GDBus.Error:org.freedesktop.ColorManager.Failed: sensor is already locked

because the device isn't unlocked after the error
Comment 1 kkaempf 2012-01-14 15:30:10 UTC
Created attachment 205265 [details] [review]
Improved patch
Comment 2 Richard Hughes 2012-01-16 12:22:55 UTC
commit 09c5755ae05daf3e73290f2aaf29f7e718fd9885
Author: Richard Hughes <richard@hughsie.com>
Date:   Mon Jan 16 11:55:01 2012 +0000

    Ensure the sensor is unlocked after failing to get a sample in gcm-picker
    
    The failure may be transitory, and if the sensor is left locked then the use
    has to restart the gcm-picker tool.
    
    This is based on a patch from Klaus Kaempf, many thanks.
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=667913