[sane-devel] annoying bug in sp15c backend ?

m. allan noah kitno455 at gmail.com
Wed Jan 9 20:48:50 UTC 2008

my preference would be to help Rene extend the Avision backend to
fully support these machines (or maybe break the avision backend into
two- older and newer machines) and drop the sp15c backend from sane.
you've used both backends, how much better is sp15c?


On Jan 9, 2008 11:06 AM,  <jazz_johnson at verizon.net> wrote:
> When I use xsane with the sp15c backend, there is a weird annoying bug related
> to the drop-down lists for the xres and yres in Save and View modes:
> In sp15c.c the x/y res are set to the following:
> static const SANE_Int resolution_list[] =
> {11, 0, 60, 75, 80, 100, 120, 150, 200, 240, 300, 600};
> static const SANE_Int x_res_list[] =
> {11, 0, 60, 75, 80, 100, 120, 150, 200, 240, 300, 600};
> static const SANE_Int y_res_list[] =
> {11, 0, 60, 75, 80, 100, 120, 150, 200, 240, 300, 600};
> When I start up xsane in "Save" mode and then do a scan, xsane crashes
> probably because of a divide-by-zero error. After troubleshooting, I found
> out that if I switch from "Save" mode to "Viewer" mode, the xres and yres are
> initialized to 0dpi. If I then set both these resolutions to non-zero and
> then switch back to save mode, I can scan without crashing. I only need to
> reset the xres and yres once per xsane session. But every time I start xsane
> and forget to switch to "Viewer" mode and change the xres/yres to non-zero,
> xsane crashes when scanning.
> A slight wrinkle: if when I start xsane I'm in "Viewer" mode with a non-zero
> x/y res, I also have the same crash problem, unless I first switch to "Save"
> mode and change the xres/yres from their initial zero values.
> So somehow when xsane saves its last session state when it's closed out, it
> saves the xres/yres of either one or both "Viewer" and "Save" modes to 0 dpi,
> which then causes the next session of xsane to crash unless one remembers to
> switch to the mode with 0dpi x/y res and change the xres/yres values to
> non-zero.
> I'm not sure if this is an xsane issue, but I only seem to have the bug with
> the sp15c backend (The avision backend doesn't use separate xres/yres).
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org

"The truth is an offense, but not a sin"

More information about the sane-devel mailing list