Saturday, December 21, 2019

XSane preview window bug and failed to start scanner invalid argument

I had a problem the other day with XSane.

It's been working awesome and then one day, the preview window wouldn't come up properly, basically a blank window.

And then I couldn't scan anything, getting an error dialog that said "Failed to start scanner: Invalid argument".





This was driving me crazy, I power cycled the hp printer/all in one 5740 but it wouldn't work at all.


So let's see if we can scan with scanimage.

scanimage -d hpaio:/net/Officejet_5740_series?ip=192.168.1.10 --format=tiff > mytest2.tiff


That worked! So why was I getting the invalid argument error? Looking carefully I saw that the area to scan was set to basically zero. The rectangle specified was basically of zero area. If you look at the top left it's set to 8.5 and 11.69 and the bottom right is 8.5 and 11.69. I must have clicked somewhere in the "blank" preview window that set these coordinates.

It'd be nice if it said "Scan Area Coordinates invalid" instead of just "invalid argument".


I see that other people have been having the same bug with the preview window:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867667

What's interesting is that opening the preview window with CTRL+1 seems to have fixed it. Opening it with the menu Window/Show Preview was giving me the blank screen.


Anyway, I can happily scan again!


Just for fun, let's see how small a region we can actually scan without getting the "Failed to start scanner: Invalid argument" error.


The smallest I can scan is 1x1x24 (3.0B) for 3 bytes!

No comments:

Post a Comment