[hpoj-devel] [sane-devel] xsane infinite recursion

Oliver Rauch oliver.rauch@rauch-domain.de
Tue, 30 Apr 2002 23:07:38 +0200

David Paschal wrote:
> Hi, Oliver.  With the hpoj backend (http://hpoj.sourceforge.net), xsane
> (0.86, 0.84, and likely other versions as well) gets into a state of
> infinite recursion when you switch from Scan to either Copy or Fax mode.

The reason for this is simple and ugly. The version of the hpoj backend
you use defines the geometry options as float but when the frontend sets
a geometry value to e.g. 13.8 then the backend corrects this to 14.0

When you switch to copy mode then xsane reduces the selectio to the
defined printer size, e.g. 13.8. Then the backend corrects the value
to 14.0 and then xsane recognizes that the value is larger than the
defined printer size and reduces it to 13.8 ... and so on.

A backend should not correct any geometry values if this is not necessary!!!!

I will change xsane that it does not produce infinite loops in this case
(I hope this does always work because it is not possible to exactly define
the order in wich signal functions are called), but this also should be
changed in the backend if there is no good reason for correcting the values.


Homepage:	http://www.rauch-domain.de
sane-umax:	http://www.rauch-domain.de/sane-umax
xsane:		http://www.xsane.org
E-Mail:		mailto:Oliver.Rauch@rauch-domain.de