Re: sane_start problem

From: Henning Meier-Geinitz (henning@meier-geinitz.de)
Date: Tue May 29 2001 - 11:38:41 PDT

  • Next message: Henning Meier-Geinitz: "Re: sane_start problem"

    Hi,

    On Tue, May 29, 2001 at 11:30:47AM +0530, shailendra mehta wrote:
    > I am using the default available pnm backend & I have modified source code
    > of scanimage.c available in the frontend
    > directory of sane-1.0.3.
    > The input document set is a ppm file of size 1.9 MB
    > It gives error at following place in the source code:
    >
    > status = sane_start (device);
    > if (status != SANE_STATUS_GOOD)
    > {
    > fprintf (stderr, "%s: sane_start: %s\n",
    > prog_name, sane_strstatus (status));
    > goto cleanup;
    > }
    >
    > & the error is
    > prog_name: sane_start Invalid argument.

    That's the error returned by the pnm backend when sane_start() was
    called.

    > That means "status" value is unknown to sane_strstatus().

    No. That means that the backend returned SANE_STATUS_INVAL. In your
    case that probably means that the pnm file couldn't be read for some
    reason. When sane_strstatus() get's an unknown error, it would return
    "Unknown SANE status code %d". SANE_STATUS_INVAL usually menas that
    some sort of input or parameter is invalid or that an error happened
    that couldn't be expressed better with a different error code.

    > If the input file is of lower sized(300 KB) it works well.
    > But if I change it to new one with 1.9 MB then above problem occurs.
    >
    > Can anybody tell why this happens?

    Some ideas: You didn't use the correct path or filename. The pnm was
    somehow corrupted. The pnm didn't contain raw pnm data (e.g. ascii data).
    Maybe you get more information with SANE_DEBUG_PNM=255 set.

    > Is it bcos of the huge memory requirement? If so what r the limits?How to
    > set those limits?

    No limits as far as I know. I have just "scanned" a pnm image of 15 MB. No
    problems. I don't remember however, if there was a bug in 1.0.3, so
    maybe you want to look into the current ChangeLog and update to 1.0.4
    or a current snapshot.

    > & if this is only for pnm device , Can actual scanner(say hp5300 c) give a
    > problem?

    I don't think so.

    Bye,
      Henning

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



    This archive was generated by hypermail 2b29 : Tue May 29 2001 - 11:33:11 PDT