[sane-devel] Xscanimage Exits with Segmentation Fault using HP
5370C
Dan McGhee
beesnees at grm.net
Mon Sep 26 23:56:08 UTC 2005
Hello again;
Henning Meier-Geinitz wrote:
>Hi,
>
>On Sun, Sep 25, 2005 at 11:13:56AM -0500, Dan McGhee wrote:
>
>
>>Just to remind you, I'm not using the version of avision released in
>>backends-1.0.16. I'm using Rev. 280 of avision from SVN. It is patched
>>with the file Falk Rohsiepe sent me and then Rene posted a patch here
>>last month.
>>
>>
>
>I have already looked at Rene's SVN and the patch and there doesn't
>seem to be any relevant change in the above mentioned part of the
>code.
>
>
I'm sorry, but I disagree. The sequence you noted previously is
currently in Rev 282 of the avision backend on SVN. This version is not
patched.
Here is the result of 'head frpatch.r280.v2.diff'
diff -NaurbB old/avision.c new/avision.c
--- old/avision.c 2005-09-07 19:57:19.000000000 +0200
+++ new/avision.c 2005-09-08 04:13:48.000000000 +0200
@@ -90,6 +90,11 @@
ChangeLog:
+ 2005-09-07: Falk Rohsiepe
+ * modified handling for HP5370C
+ * software scaling (see avision-scale.c)
I ran 'grep -in -A 5 -B 5 OPT_NUM_OPTS frpatch.r280.v2.diff ' with the
following results:
1324-+/* the following expect the memory to be zero-initialized */
1325-
1326:- s->opt[OPT_NUM_OPTS].name = "";
1327:- s->opt[OPT_NUM_OPTS].title = SANE_TITLE_NUM_OPTIONS;
1328:- s->opt[OPT_NUM_OPTS].desc = "";
1329:- s->opt[OPT_NUM_OPTS].cap = SANE_CAP_SOFT_DETECT;
1330:- s->opt[OPT_NUM_OPTS].type = SANE_TYPE_INT;
1331:- s->opt[OPT_NUM_OPTS].size = sizeof(SANE_TYPE_INT);
1332:- s->val[OPT_NUM_OPTS].w = NUM_OPTIONS;
1333-+static void
1334-+init_option_group (Avision_Scanner *s, int idx, const char* title)
1335-+{
1336-+ s->opt[idx].title = title;
1337-+ s->opt[idx].desc = "";
This indicates that the line you mentioned (1331 of the patch) is
removed from avision.c when the patch is applied. OPT_NUM_OPTS appears
again in the patch here:
1590:+ init_option_int (s, OPT_NUM_OPTS, "", SANE_TITLE_NUM_OPTIONS, "",
1591-+ SANE_UNIT_NONE, SANE_CAP_SOFT_DETECT, 0, 0,
1592-+ NUM_OPTIONS);
1593-+
1594-+ /* "Mode" group: */
1595-+ init_option_group (s, OPT_MODE_GROUP, SANE_TITLE_SCAN_MODE);
and here:
3559- enum Avision_Option
3560- {
3561: OPT_NUM_OPTS = 0, /* must come first */
3562-@@ -181,6 +197,7 @@
3563- OPT_MODE,
3564- OPT_RESOLUTION,
3565- #define OPT_RESOLUTION_DEFAULT 150
3566-+ OPT_SOFTSCALING,
These are the two instances of OPT_NUM_OPTS that I have in the version
of avision that I use.
Avision.c is a pretty big file to put on a mailing list, but, if you'd
like to take a look at it to see whether you could find something, I
would be more than happy to send the patched version of avision.c.
Regards,
Dan
More information about the sane-devel
mailing list