Timeout during scanner detection

70 views
Skip to first unread message

Jim Norman

unread,
Jan 3, 2013, 12:51:42 AM1/3/13
to open...@googlegroups.com
Running opendias 0.8.1, I encounter a timeout (and opendias process stops) See attached screenshot).  I have a Fujitsu ScanSnap 1500 scanner attached via USB. XSane recognizes it quickly.
Screenshot from 2013-01-03 00:48:54.png

Wayne Booth

unread,
Jan 3, 2013, 8:33:08 AM1/3/13
to open...@googlegroups.com
Hi Jim,

Sorry to see that you are having trouble.

Can you update the log verbosity of opendias, 
   opendiasconfig -s log_verbosity -v 4
restart opendias, try your action again, and then attach the log to this report.

Hopefully we can get to the bottom of your problem.

Regards.
Wayne

Jim Norman

unread,
Jan 3, 2013, 9:42:32 AM1/3/13
to open...@googlegroups.com
I tried attaching the log file twice (it's 34K). but got error 340 both times.  You should be able to see it at http://pastebin.com/s9KJAubd.

I hope I didn't seem negative by posting errors.  I think the project has LOTS of potential, and was considering writing something similar whenI encountered opendias during a search.  If I may be of assistance in any way, please let me know.  I'm also a software developer, and have experience with c and web technologies.

Jim Norman

unread,
Jan 3, 2013, 12:14:12 PM1/3/13
to open...@googlegroups.com
It looks to me like the error is occuring in sane_open library call, after having found devices.  

Unfortunately, I have a network scanner which is causing problems (I suspect).  It would be helpful if more than one device is discovered, to present a selection dialog to the user before attempting to open the device.

Wayne Booth

unread,
Jan 3, 2013, 5:16:16 PM1/3/13
to open...@googlegroups.com
Hi,

It is certainly happening around then. However, you said that you haver a network scanner, so it could be around the lookup of the hostname (which happens just after the open).
I'm building a 12.10 VM now in an attempt to replicate your problem.
I'll be in touch soon.

Regards
Wayne.

Jim Norman

unread,
Jan 4, 2013, 8:56:18 AM1/4/13
to open...@googlegroups.com
Wayne, I'm quite sure the network scanner is hanging it.  I see similar behavior with xsane, but I'm able to choose the scanner there before it does an open, so I can get to the Fujitsu unit.  I'm going to look this weekend to selecting the scanner before doing a scan_open.  I also note that you don't do a scan_init - why is that?

Jim Norman


On Thursday, January 3, 2013 12:51:42 AM UTC-5, Jim Norman wrote:

Wayne Booth

unread,
Jan 6, 2013, 7:35:27 AM1/6/13
to open...@googlegroups.com
Hi,

Well I suppose the fact this is happening for other sane frontends means there is a problem with that specific sane backend over a network (or the local instillation/setup). You may want to raise a bug with sane about this.

As a short term work around, you could disable the 'net' backend in your sane.dll config file so that scanner (which is causing the trouble) is not found.

Given both the above (a sane bug and a local workaround) I wouldn't be changing openDIAS, but, if you wanted to go ahead and made functional changes to openDIAS, can you branch from "development_0_9"  in git.

I'd suggest the following:
The device is only opened on the getScannersList call get get the available resolution. You could defer that open and resolution gathering to a subsequent call made by AJAX if someone clicks on that scanner tab in the acquire page.
This way we keep the current user interface, but only trigger the problem if someone wants to use the broken backend.

btw: sane_init is done when the application starts. All sane work is done in the main application thread. can called to from the separate threads created by the application to handle client requests. This is done because sane is not thread safe. :(

Let me know what you think about the above, and if you make any changes... Good luck

Cheers.

Jim Norman

unread,
Jan 7, 2013, 10:00:06 AM1/7/13
to open...@googlegroups.com
Wayne, I like your approach better.  By deferring the sane_open call till the tab is selected, and by using an AJAX call to get resolution, and open the scanner.  That allows selecting a different scanner, if available.

I'll look at coding that approach, and let you know.

Jim Norman

On Thursday, January 3, 2013 12:51:42 AM UTC-5, Jim Norman wrote:

Wayne Booth

unread,
Jan 13, 2013, 9:36:24 AM1/13/13
to open...@googlegroups.com
Hi Jim,

Hows the changes going?

Wayne

Wayne Booth

unread,
Apr 15, 2013, 8:20:50 AM4/15/13
to open...@googlegroups.com
Hi Jim,

Just to let you know, this symptom has been fixed in the recent 0.9.3 beta release. .

I've implemented the separation of "getting scanner lists" and "calculating their parameters". I've also isolated the SANE operations in a separate process, so if a back-end does crash, it does not take openDias with it.

I do, hope you can let me know how this works out for you.

Cheers.
Reply all
Reply to author
Forward
0 new messages