Menu

#71 Crash when unable to access USB device node

version 1.11
closed-fixed
5
2007-10-30
2007-09-23
No

When the device node assigned to the colorimeter is not read/writeable by the user (or a group of which the user running lprof is a member) then lprof exits.

If the user has no rights to the device node whatsoever then the following message is printed to the console as lprof exits:

Numeric: Error - icoms - set_ser_port: illegal baud rate!

If lprof has read-only access to the device node, the following message is printed to the console as lprof exits:

Numeric: Error - Configuring USB port 'usb:/bus0/dev0 (GretagMacbeth i1 Display)' to 1 failed with -1 (could not set config 1: Operation not permitted)

This can be reproduced by manually setting permissions on the device node and running lprof then:
1) Clicking on "Monitor Profiler" tab
2) Clicking "Build an accurate profile from measurements"
3) Then clicking "Calibrate and Measure"
4) Then selecting options and clicking "Next>"
5) Then selecting "Set white point" and then "Make adjustment"
6) Then clicking "Go"

Discussion

  • Hal Engel

    Hal Engel - 2007-09-24

    Logged In: YES
    user_id=1052244
    Originator: NO

    Thanks for the very good description of the problem. I have been able to reproduce the error and will be looking into it. This is happening in a library from another project which makes things a little harder since I do not know this code was well as I would like to. Hopefully I can trap these errors in my code and will not have to dig into the library code to figure out what is happening.

     
  • Hal Engel

    Hal Engel - 2007-09-24
    • labels: --> MonitorProfiler
    • assigned_to: nobody --> hvengel
    • milestone: --> version 1.11
     
  • Hal Engel

    Hal Engel - 2007-09-25

    Logged In: YES
    user_id=1052244
    Originator: NO

    I have a fix for this on my machine and I am in the process of testing it and cleaning up the code. I should have this into CVS later today or early tomorrow. It was difficult to trap the error and I had to make modifications to the library I am using. This is something that I did not want to do since it means that I have to now maintain changes in someone else's code.

    In any case a fix is on the way.

     
  • Hal Engel

    Hal Engel - 2007-09-25

    Logged In: YES
    user_id=1052244
    Originator: NO

    This change is now in CVS. Please test it.

     
  • Hal Engel

    Hal Engel - 2007-09-25
    • status: open --> pending-fixed
     
  • Tony Whitmore

    Tony Whitmore - 2007-09-26

    Logged In: YES
    user_id=633934
    Originator: YES

    I see the nicer message now when I have read-only access to the device node. Thanks!

    lprof still crashes when there is no permissions on the device node (or should this be no device detected!):
    Numeric: Error - icoms - set_ser_port: illegal baud rate!

     
  • Tony Whitmore

    Tony Whitmore - 2007-09-26
    • status: pending-fixed --> open-fixed
     
  • Hal Engel

    Hal Engel - 2007-09-27

    Logged In: YES
    user_id=1052244
    Originator: NO

    What do you have to do to your system get the new error to happen. It seems to me that if no device is detected it would not show up in the list of devices. But the library I am using has lots of things that it does that are not very gracefully handled and this is probably one of them. In any case if I can reproduce the error I will find a way to keep it from happening. Either by making sure devices like this are not listed where users can select them or by trapping the error like I did with the previous one.

     
  • Hal Engel

    Hal Engel - 2007-10-03
    • status: open-fixed --> open-accepted
     
  • Hal Engel

    Hal Engel - 2007-10-03

    Logged In: YES
    user_id=1052244
    Originator: NO

    I found where the last error was occurring and I have added code to trap it. So this should be handled gracefully now. Please test.

    The change is in CVS along with a bunch of updates to the system including a newer version of the meter support code (It now has support for the ColorVision Spyder 2 meters). I think that the library that provides the meter support has had many bug fixes. Of course there may be new bugs that were introduced as well. The version before this last CVS update was 0.7 beta 3 and it is now 0.7 beta 6. So far I can't tell any differences on my machine but it might help others who are experiencing problems.

     
  • Hal Engel

    Hal Engel - 2007-10-16
    • status: open-accepted --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.