#34 open

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

Reported by Timbo | March 7th, 2009 @ 01:00 PM | in 0.5

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".

Comments and changes to this ticket

  • onyxfish

    onyxfish March 7th, 2009 @ 02:53 PM

    • 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.

  • onyxfish

    onyxfish March 7th, 2009 @ 02:58 PM

    • 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 state:hold] http://github.com/bouvard/nostap...

  • Timbo

    Timbo March 7th, 2009 @ 03:39 PM

    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).

  • onyxfish

    onyxfish March 7th, 2009 @ 04:38 PM

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

    See ticket [#34 state:hold] http://github.com/bouvard/nostap...

  • onyxfish

    onyxfish March 7th, 2009 @ 04:44 PM

    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

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

    Thanks for testing!

  • Timbo

    Timbo March 8th, 2009 @ 07:40 AM

    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 :)

  • Timbo

    Timbo March 8th, 2009 @ 07:40 AM

    • no changes were found...
  • onyxfish

    onyxfish March 8th, 2009 @ 10:23 AM

    • 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. 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. :)

  • Timbo

    Timbo March 8th, 2009 @ 12:45 PM

    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 :)

  • onyxfish

    onyxfish March 8th, 2009 @ 06:48 PM

    • 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.)

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A PyGTK-based desktop scanning application with an emphasis on low-volume document archival for small businesses and home offices.

People watching this ticket


Referenced by