Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xsane crash in color preview

0 views
Skip to first unread message

Fabiolo

unread,
Jan 12, 2003, 7:05:40 AM1/12/03
to
hello everybody, I installed xsane to use my Epson USB scanner.

I configured everything correctly, the scanner is found and basically it
works but I have a problem: if I select the "Binary" mode on the xsane
main window and press the "Acquire preview" in the "Preview" window, I get
the scanned image and it's ok. But if I select "Gray" or "Color", I get
the preview but just after the scanning is completed xsane crashes
(segmentation fault - core dumped). The problem seems to be just related
to the preview because if I press the "start" button to scan the whole
page it works.

This happens with two different FreeBSD computers (a laptop and a
desktop).

I think the problem is the xsane frontend because if I use the scanner
through the network (saned running on FreeBSD) from another Linux machine
everything works fine.

FreeBSD 4.7
xsane-0.87
sane-backends-1.0.8


Has anybody experienced the same problem ? is there any other good sane
frontend (if I cant get xsane working) ?

Thanks
Fabiolo

Fabiolo

unread,
Jan 12, 2003, 7:16:24 AM1/12/03
to
On Sun, 12 Jan 2003 13:05:40 +0100, Fabiolo wrote:

> I think the problem is the xsane frontend

I mean "the FreeBSD port of xsane"

Jason Naughton

unread,
Jan 12, 2003, 2:45:31 PM1/12/03
to
"Fabiolo" <spam...@yahoo.com> wrote in message news:<pan.2003.01.12....@yahoo.com>...

> On Sun, 12 Jan 2003 13:05:40 +0100, Fabiolo wrote:
>
> > I think the problem is the xsane frontend
>
> I mean "the FreeBSD port of xsane"

Hi,

I've just upgraded my version of xsane on Freebsd 4.7 to version 0.90
without any problems. I have a epson 1660 photo that I'm using with
xsane. I'm not experiencing any problems with the color preview. Try
determining wether it's a frontend or a backend problem. Use the
scanimage sane util to scan a color image. Ideally all the preview is
doing is a low res scan of your image so that you can select a region
to high res scan. If you can scan without any issues with imagescan
(and all the switches that you need to set res and so forth) then you
may have a front end issue. Yet I wouldn't doubt it's the backend
driver that's seg-faulting... What scanner are you using?

spaz

unread,
Jan 12, 2003, 10:53:28 PM1/12/03
to
On Sun, 12 Jan 2003 12:45:31 -0700, Jason Naughton wrote:

> I have a epson 1660 photo that I'm using with
> xsane.

1660? That's something. How'd you do it? I have one too. I got it
working by hacking a bit of the kernel code and recompiling the kernel.

(I tried to suggest the patch to the freeBSD folks; but the tool uses
Sendmail - which I have deliberately disabled on my system -- but I
digress.)

spaz

unread,
Jan 12, 2003, 10:57:28 PM1/12/03
to

I believe it's the xsane frontend that's a problem.
I have similar problems with an Epson Pefection 1660 Photo scanner on
Xsane. I can scan all day using the xscanimage frontend.

I have noticed that Xsane does some automatic color/brightness/contrast
adjustments right after making the preview. If the image is real
contrasty - like a night shot with some bright lights, or fireworks -
Xsane will coredump when it makes those adjustments. It's really hard to
scan an image like that using xsane.... in my experience.

Fabiolo

unread,
Jan 13, 2003, 9:11:02 AM1/13/03
to
jnau...@ee.ryerson.ca (Jason Naughton) wrote in message news:<7581eed0.03011...@posting.google.com>...


> I've just upgraded my version of xsane on Freebsd 4.7 to version 0.90
> without any problems.

the FreeBSD ports version is still 0.87 (at least, this is what I see
in the port Makefile read directly on the FreeBSD ftp site).

Did you upgrade compiling the sources ?
I always used ports, and would prefear not mixing ports and other
packages.

>Try
> determining wether it's a frontend or a backend problem.

I'm basically sure it's a frontend problem. The same backend (running
on a FreeBSD pc) works fine if the scan is performed by a Linux
machine through saned (and the Linux frontend does not crash).
The same backend works fine if I use xscanimage and scanimage.

>What scanner are you using?

Epson Perfection 1200U

Thanks
Fabiolo

henry tieman

unread,
Jan 13, 2003, 1:37:08 PM1/13/03
to Fabiolo
I have seen this in the past, I dug through the code for xsane and found
it was a compiler problem. Compiling with '-g' instead of '-O' caused
the problem to go away. Compiling with both, '-g -O', leads to the
descovery that the problem is a bad test for a loop variable in
preview_autoselect_scanarea() in xsane-preview.c. The problem is that
the second loop is incrementing 'x' but comparing 'y' and eventually
going past allocated memory. Not a good thing to have come out from a
compiler. It depends on what is on the stack since the variable y is
uninitialized at the tine of the compare. In my case only some of the
pictures I wanted to scan caused crashes and only if I tried to scan
them first but not later - frustrating to recreate.

My workaround was, and still is, to hack the Makefile amd make it
compile with '-g'.

henry

Fabiolo wrote:


--
Henry Tieman
Objects in the mirror are closer than they appear.

Warren Block

unread,
Jan 13, 2003, 9:49:53 PM1/13/03
to
henry tieman <henryt...@aracnet.com> wrote:
> I have seen this in the past, I dug through the code for xsane and found
> it was a compiler problem. Compiling with '-g' instead of '-O' caused
> the problem to go away. Compiling with both, '-g -O', leads to the
> descovery that the problem is a bad test for a loop variable in
> preview_autoselect_scanarea() in xsane-preview.c. The problem is that
> the second loop is incrementing 'x' but comparing 'y' and eventually
> going past allocated memory. Not a good thing to have come out from a
> compiler. It depends on what is on the stack since the variable y is
> uninitialized at the tine of the compare. In my case only some of the
> pictures I wanted to scan caused crashes and only if I tried to scan
> them first but not later - frustrating to recreate.
>
> My workaround was, and still is, to hack the Makefile amd make it
> compile with '-g'.

You should probably mail the port maintainer to get this added to the
Makefile. Or the xsane people themselves.

--
Warren Block * Rapid City, South Dakota * USA

spaz

unread,
Jan 18, 2003, 1:06:38 PM1/18/03
to
On Mon, 13 Jan 2003 11:37:08 -0700, henry tieman wrote:

[snip]


> My workaround was, and still is, to hack the Makefile amd make it
> compile with '-g'.
>

[snip]

I can't figure out where this hack should be made. Any coaching?

Jeffrey Eugene Crawford

unread,
Jan 18, 2003, 5:53:15 PM1/18/03
to
The problem here is still that xsane has found some sort of optimization error
in gcc. If you compile the package using "CFLAGS=--pipe" (Which by the way
overrides the normal "CFLAGS=-O --pipe") the program works correctly. I don't
know why this hasen't been fixed yet! This should look something like

cd /usr/ports/graphics/xsane
CFLAGS=--pipe make install
CFLAGS=--pipe make reinstall

Depending on whether or not you deinstall the package first.

Or with (Well recomended) portupgrade package
portupgrade -RuM CFLAGS=--pipe
portinstall -RuM CFLAGS=--pipe

Since it is already installed you can try

--
_______________________________________________________________
/ /
/ Jeffrey E. Crawford /
/ Systems / Network Engineer /
/ Microsoft MCSE Windows NT / 2000 /
/ Comptia A+ Network+ /
/ Mail: jeffrey....@nospam.de /
/ /
/ To send me email replace "nospam" with "netcologne". /
/______________________________________________________________/

spaz

unread,
Jan 18, 2003, 10:35:25 PM1/18/03
to
On Sat, 18 Jan 2003 15:53:15 -0700, Jeffrey Eugene Crawford wrote:

[snip][snip]

I'm running

portinstall -RuM CFLAGS=--pipe xsane

right now. Many thanks.

Karsten Rothemund

unread,
Jan 25, 2003, 9:33:40 AM1/25/03
to

I've the same problem. Also updated to xsame 0.9 -> same behaviour. Looking
for a solution too.

I saw a "resource temporally unavailable" in an strace. But I don't know
anything more about strace.


0 new messages