You are not logged in.

#1 2013-07-11 15:20:40

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

[Solved] Sane / Scanimage Core Dump

When I try and use scanimage to scan from a Canon USB flatbed, I always get a segmentation fault and coredump.

This is happening on two different machines. Here's the journalctl output for two different attempts to use scanimage -L

Jul 11 16:04:12 SKANKY kernel: scanimage[25475]: segfault at ffffffffb9f89988 ip 00007f9d50683c51 sp 00007fffb9f89528 error 5 in libc-2.17.so[7f9d50602000+1a3000]
Jul 11 16:04:12 SKANKY systemd-coredump[25576]: Process 25475 (scanimage) dumped core.
Jul 11 16:06:00 SKANKY kernel: scanimage[26134]: segfault at ffffffffbac3ec38 ip 00007f2bfaf2ec51 sp 00007fffbac3e7d8 error 5 in libc-2.17.so[7f2bfaead000+1a3000]
Jul 11 16:06:00 SKANKY systemd-coredump[26206]: Process 26134 (scanimage) dumped core.

The failure is always immediately after it asks for my password on my other machine, and even with the debug setting up high, there's no output between that and the dumping.

Avahi and dbus are both running (I think both are used by sane?).

Oddly, xsane works okay, but it's a hassle to fire that up every time, when I have a function that used to work and do the job.

There's nothing on this forum more recent then 2011, and I haven't found anything on DDG.

Anything else I can supply or do to debug?

Last edited by skanky (2014-01-03 17:39:57)


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#2 2013-12-30 06:43:02

nullspoon
Member
Registered: 2013-06-18
Posts: 10
Website

Re: [Solved] Sane / Scanimage Core Dump

Sorry to necro here. This hasn't been solved yet and I think I might have some input since this is apparently a current issue still.

Skanky,

I bought a Canon lide110 today because it was listed as having "complete" support (http://www.sane-project.org/sane-mfgs.html#Z-CANON) as per the sane supported devices page. When I started using the scanner, I found I had almost the same issues you experienced. In my case though, I was able to scan once using scanimage, then the device disappeared from my system (lsusb showed it, but nothing else did, including xsane). If I tried to run scanimage again, it core dumped. If I started fresh (unplug usb and replug) and used xsane, it worked fine. I could scan as many images as I wanted without trouble.

Long story short, I was hoping to do some bulk scanning and OCR, which requires a command line scan utility like scanimage. I managed to fix it (oddly) by calling scanimage from inside my script. For whatever reason, I can call my script which calls scanimage as much as I want and it works fine. If I call scanimage directly though, it works once and then fails (core dump).

I'm calling scanimage with no differently in my script than when I call it directly. The only thing I can think of is that it has something to do with not closing the image file since scanimage won't save to a file, rather it outputs to stdout and has to be redirected to its destination file. I'm wondering if it's not closing the file, leaving the device in an in-use state preventing further usage. I am by no means experienced with drivers though so I'm most likely wrong (not to mention output redirection is a function of the shell, not scanimage).

I hope that helps you out. So far I'm about 20 documents down with a few hundred to go and haven't had any issues since calling it from my script.

Last edited by nullspoon (2013-12-30 06:45:13)

Offline

#3 2014-01-02 22:13:28

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [Solved] Sane / Scanimage Core Dump

Hi nullspoon, thanks for the reply.

I haven't needed to scan anything for a while, so I'll try it all again tomorrow. If I do scanimage -l on this machine now (while no device or other machines are accessible) it correctly returns the right result (no devices available). So I'll need to see when I'm back in a working environment.

scanimage failed from a script as well for me, and some of the behaviour sounds a little different, but I'll need to try again to check.

I'd like to be able to try it disabling the check for devices on other machines, to rule in/out the network device search as an issue, but I didn't see how to do that at the time. I'll look again when if the behaviour is the same.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#4 2014-01-03 17:41:30

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [Solved] Sane / Scanimage Core Dump

Okay, I've done some testing today, and haven't managed to make it segfault. I've successfully scanned and done a scanimage -L. Whatever the issue was my particular one is fixed.
Sorry I can't be of help nullspoon.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB