Re: microtek e3 dumps core

Matto Marjanovic (maddog@mir.com)
Fri, 19 Jun 1998 00:46:26 -0400 (EDT)

I'm using scan 0.73 with the microtek backend and an Scanmaker e3.

When I try to scan an image in, it appears, greater than 259 resolution
the scanner starts to scan, then xscanimage dumps core and quits. The
ready lite on the scanner is off at this point and I have to power
the scanner on/off for another attempt.

Which version of the backend? 0.7 (packaged with SANE 0.73), or 0.8,
available on my website? And, does this problem manifest itself with
all scans, or just color ones?

There has been a recurrent problem with high-res color scans: the backend
used to pre-allocate a couple of fixed-size buffers which it uses to
rearrange and reconstruct RGB pixels from R, G, and B scanlines. The
size calculation was based on a heuristic which is equivalent to guessing
the distance between the R, G, and B ccd's in the scanner head.
This always worked for the E6, 'cause it always works for me.... But, as
you may expect, other models use different ccd configurations. The buffers
could be too small, and this may or may not cause a segfault, depending
on the memory layout of the scanimage process.

Version 0.8 of the backend dynamically expands the buffers as necessary.
(I discovered the mighty "realloc" function -- don't know what it does
to the heap, but it seems to work.)

I'd found this behaviour in .69(?) and thought it had gone away, but
it appears not. I don't know if it is the file size or a sanner problem
which causes this. If someone can guide me in what to do I'll be glad
to do some debugging, but with only a huge core file I'm not sure of
where to start.

As always, the only way to tell what is going on is to dump debugging output
during a scan, and analyze that. If xscanimage bombs out while in the
middle of a backend function (like sane_read, or, especially, the infamous
"process_goofy_rgb") then it's probably a backend problem.

-matt m.

Ref: http://www.mir.com/mtek/

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com