[sane-devel] SuSE 10.0 gets "Out of memory" for Epson 4870 (GT-X700)

Olaf Meeuwissen olaf.meeuwissen at avasys.jp
Mon Oct 24 01:58:52 UTC 2005


Henning Meier-Geinitz <henning at meier-geinitz.de> writes:

> Hi,
>
> On Sat, Oct 22, 2005 at 01:33:37PM -0400, Karl Heinz Kremer wrote:
>> The error message comes from the scanner, and not Sane or XSane (or  
>
> Are you sure (well, it's your backend :-)?
>
> [epson] out of memory (line 4860)
>
> This is the code which results in the error (in sane_start):
>
>   if (lcount == 0)
>     {
>       DBG (1, "out of memory (line %d)\n", __LINE__);
>       return SANE_STATUS_NO_MEM;
>     }      
>
> As far as I can see, lcount is set here:
>
> lcount = sanei_scsi_max_request_size / s->params.bytes_per_line;
>
> So lcount would be 0 if sanei_scsi_max_request_size were smaller than
> (in this case) 41712. Maybe there is a problem with this kernel buffer
> size?

I ran into this as well when looking into a bug with iscan.  The
default value for sanei_scsi_max_request_size is 32768 so that
scanning at highish resolutions will easily overflow this (~10900
pixels on a single scanline for 8bit RGB).  What strikes me as odd
is the fact that this code is also used for _USB_ scanners!

I can understand the lcount stuff, but I don't understand why it
would use a SCSI related maximum for _all_ scanner types?  Karl,
care to shed any light on this?
-- 
Olaf Meeuwissen                          EPSON AVASYS Corporation, LAN
FSF Associate Member #1962           sign up at http://member.fsf.org/
GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97  976A 16C7 F27D 6BE3 7D90
Penguin's lib!       -- I hack, therefore I am --               LPIC-2



More information about the sane-devel mailing list