Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Scanner that does not specify a constraint range step throws inexact values exception.

#34

I'm using the ubuntu-package (0.40-0) you are offering on the main page.

While nostaples is querying my hardware (a Epson Perfection 1260/Photo, which is working with xsane), it crashes and shows me a error-window saying "An unhandled exception has been logged".

I attached the logfile and the output of "nostaples --debugdevices".

Reported by Timbo · March 7th, 2009 @ 01:00 PM

State: open
Milestone: 0.5
Assigned to: onyxfish onyxfish

Activity

  1. onyxfish
    onyxfish
    • Tag set to exception, resolution, sane
    • State changed from new to open
    • Milestone set to 0.5

    Interesting, it looks like this is another case where the SANE backend is specifying something I did not expect to be allowed, namely that it supports a range of resolution values, but does not specify an increment between them. That's strange, but I should be able to adapt handle it fairly easily.

    Unfortunately, I can not say for certain that is the only issue as --debugdevices seg-faulted after printing nineteen options. I know what caused that and I have already fixed it, but I can not say for certain that it is not masking other problems.

    Thank you for the debug logs, that makes my life much easier. Look for fixes for both these issues to be in 0.5.

    March 7th, 2009 @ 02:53 PM

  2. onyxfish
    onyxfish
    • State changed from open to hold

    (from [23bda7674f915ff80161bd13b18f3ded24453d42]) Experimental fix for options that do not specify a range step.

    This needs to be tested. [#34 Scanner that does not specify a constraint range step throws inexact values e... state:hold] http://github.com/bouvard/nostap...

    March 7th, 2009 @ 02:58 PM

  3. Timbo
    Timbo

    Thanks for the workaround. Since I didn't know how to install the git-version, I copied the changes into my models/main.py - I hope that was correct.

    Unfortunately nostaples still crashes (see attached logfile).

    March 7th, 2009 @ 03:39 PM

  4. onyxfish
    onyxfish

    (from [2ba11aa9b415466d6cd6845372fdf99f584f128c]) Guard against second possible ZeroDivisionError involving option constraint step.

    See ticket [#34 Scanner that does not specify a constraint range step throws inexact values e... state:hold] http://github.com/bouvard/nostap...

    March 7th, 2009 @ 04:38 PM

  5. onyxfish
    onyxfish

    Timbo, thanks for going the extra mile and pulling in the fix from GitHub (I wasn't expecting that. :D) As you can see I have committed a fix for this new division-by-zero bug. If you would like to test the fix you would just need to replace nostaples/sane/saneme.py with the one from GitHub. Or, if you find it simpler (and want to get other fixes), you can run the GitHub version in place using the following:

    
    export PYTHONPATH=/path/to/dir/containing/nostaples
    ./nostaples
    

    On my machine the relevant path is $HOME/src.

    Thanks for testing!

    March 7th, 2009 @ 04:44 PM

  6. Timbo
    Timbo

    Thanks, it now finds my device. Unfortunately now I have even more work for you ;)

    1) The resolution list shows the following options: 50, 285, 520, 755, 990, 1225, 1460, 1695, 1930, 2165, 2400. I can activate and scan with 50, 1225 and 2400 dpi. When I click on any of the other options, nostaples locks up (see logfile) 2) The modes "color" and "grey" are working. However a lineart-scan results in a crash (see logfile, beginning with line 160). This does not depend on the resolution-settings. 3) Although it seems that the whole page is being scanned, nostaples always shows only a small part of the page (see attached pdf)

    If I can do anything to help you resolving these issues, let me know :)

    March 8th, 2009 @ 07:40 AM

  7. Timbo
  8. onyxfish
    onyxfish
    • State changed from hold to open

    Hey, I'm glad its finding the scanner! With regard to your other issues:

    1) Looks like my hack for scanners which support weird resolutions wasn't quite good enough. At least it crashed at my assertion and not somewhere else. :P (Reopening the ticket for this.)

    2) This is currently open ticket #24 Scanning in Lineart Mode causes a buffer overflow in PIL.. Same thing happens with my Lexmark 1150.

    3) This is likely to be a problem for a lot of people until I get the scan-source/page-size specification code in there. This is one of the larger issues slated to be addressed in 0.5 Unfortunately, I needed to get to the point where the devices were actually showing up before I could reasonably tackle this issue.

    So stay tuned, and hopefully I haven't blown your interest. :)

    March 8th, 2009 @ 10:23 AM

  9. Timbo
    Timbo

    Okay, I added the rss-feed to my reader and will follow the further development.

    Btw: Thanks for your effort in developing this nice app. The current UI is looking very promising. I hope, I soon can replace the ugly xsane by nostaples :)

    March 8th, 2009 @ 12:45 PM

  10. onyxfish
    onyxfish
    • Title changed from Crash while querying for my scanner to Scanner that does not specify a constraint range step throws inexact values exception.

    Updating title to reflect outstanding issue.

    And thanks for the support. I'm glad someone else is looking forward to the day xsane is not the de facto imaging solution on Linux. :) Even if its not NoStaples that fills that role I will be happy!

    (Oh, by the way, the Lineart issue is also fixed in the source repo, see ticket #24 Scanning in Lineart Mode causes a buffer overflow in PIL..)

    March 8th, 2009 @ 06:48 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.