[sane-devel] Issue 642
karl.weber99 at gmail.com
Mon Jul 3 12:51:43 BST 2023
thank you very much for your help! I was indeed able to analyze a little bit
more -- see my comment below. However, since my scanner seems to work
flawlessly with the airscan backend with even more options than the hpaio
backend supports, I will not invest more time into this analyzes. Nevertheless
I would like to share what I found out thus far.
On Sonntag, 18. Juni 2023 14:14:42 CEST Andy Bennett wrote:
> I've just read the issue for the first time and haven't been involved but I
> noticed that you mentioned "Works with all formats (jpeg, tiff, png, pnm)
> and with a resolution of 600. scanimage does not crash, the images are not
> corrupt." and then provide examples where it does crash.
> However, you don't say if you can make it crash with a pnm format output.
> If you haven't done so, it might be worth trying to make it crash with a
> pnm output.
> 1) If it never does then it would suggest (to me) that the bug is between
> the scanning code and the format conversion code: perhaps the backend
> provides information that causes the format conversion code to be
> initialised incorrectly for the page size, which causes trouble when data
> aligns (or doesn't align) in certain ways.
> 2) However, if a pnm is produced but is truncated then you know the problem
> is with the amount of data that the backend is collecting.
> 3) If it still crashes in the same way then that could eliminate the file
> conversion code and point to a (perhaps) more serious bug in the backend.
The result of my analysis points to problem number (2): the hpaio backend is
not sending enough data. I guess, this should already have been clear to Ralph
from the beginning.
With pnm format scanimage scans all pages and works without noticeable error.
However, when scanning from the ADF, all pages are missing some data. The
length of the images corresponds to the data the hpaio backend transferred,
according to the debug trace. Since some data are missing, the images are
syntactically not correct and various tools, like identify, complain.
What made me wonder was, that skanlite produces syntactically correct images,
in contrast to scanimage. The debug trace shows, that the hpaio backend
transfers the same amount of data in both cases, when scanning with scanimage
and skanlite. If the debug trace is not lying and I am understanding what it
says, I must conclude, that somehow skanlite is adding some data at the end of
the image, just so much as are missing, so that the image is syntactically
correct. To analyze this further would have been my next step. Fortunately,
airscan came to my rescue and makes any further analyzes obsolete.
P.S. In the meantime I updated to openSUSE 15.5 which uses a newer version of
hplip and in particular hpaio, but it still does not work any better.
More information about the sane-devel