Simple Scan crashes on save

Bug #539381 reported by Jay Gindin
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Undecided
Unassigned

Bug Description

Installed by: "sudo add-apt-repository ppa:robert-ancell/simple-scan"
Current version (as reported by the Help -> About) is 0.9.9.
Running on Kubuntu 9.10, with KDE 4.4.1

I'm scanning multiple pages from the ADF (this is an HP Photosmart C7280)
The scan works BEAUTIFULY!!!
Click to save the pdf, and simple-scan just disappears.

From /var/log/messages:
Mar 15 22:01:02 daddy kernel: [903960.130724] convert[27092]: segfault at 3220 ip b766cf39 sp bfca5360 error 6 in libMagickCore.so.2.0.0[b758f000+1d2000]
Mar 15 22:01:02 daddy kernel: [903960.146108] simple-scan[27076]: segfault at 8 ip 080568b9 sp bfa163b0 error 4 in simple-scan[8048000+19000]
Mar 15 22:08:06 daddy kernel: [904384.160662] convert[27181]: segfault at 3220 ip b76edf39 sp bf8a8880 error 6 in libMagickCore.so.2.0.0[b7610000+1d2000]
Mar 15 22:08:06 daddy kernel: [904384.235761] simple-scan[27157]: segfault at 8 ip 080568b9 sp bfa2c2e0 error 4 in simple-scan[8048000+19000]

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Could you run with simple-scan -d and paste the output here?

Changed in simple-scan:
status: New → Incomplete
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Also, does this always occur? Does it occur when saving only one page?

Revision history for this message
Jay Gindin (jayg) wrote :

Attaching output from "simple-scan -d".

I also verified that a single page scan does seem to work. (However, I notice that the page is scanned 90 degrees sideways, but...it works, and you're kind enough to provide the rotation buttons :-)

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hi Jay,

Is this still a problem? The crash shows that is is ImageMagick that is crashing, I haven't had any duplicates so I'm thinking there is a problem in your installation.

You can test ImageMagick by making some TIFF and JPEG files (save from simple-scan with .tiff extension or use GIMP etc) and run the following command (which is what Simple Scan is doing):
$ convert -adjoin file1.tiff file2.jpeg output.pdf

Could you please experiment with the images you are scanning and see if you can work out what reproduces the problem?

(also, please look in /tmp after the crash to see the temporary files that Simple Scan created. If you can reproduce please attach the files that cause the problem)

Revision history for this message
Jay Gindin (jayg) wrote :

I created 2 simple files in GIMP, pg1.tiff and pg2.jpeg. Running the "convert -adjoin pg1.tiff pg2.jpeg output.pdf" causes a segmentation fault.

I've got imagemagik 7:6.5.1.0-1.1ubuntu3 installed.

I guess this probably isn't an issue with simple-scan, but none-the-less, I'd appreciate any pointers you may have on where to start my investigation with imagemagik...I have about zero experience with that package...

Thanks for your helpfulness in figuring out this issue...

Revision history for this message
theLawman (billieboy) wrote :
Download full text (38.8 KiB)

I think I have the same problem with multiple pages but only (ithink) when converting form .jpg to .pdf, Scanning and saving works perfectly with single pages.

Here is the (edited as marked "...") output of "simple-scan -d" first saving multiple pages as .jpg which worked and then saving multiple pages to .pdf which didn't. I hope this is of some help.

** (simple-scan:9577): DEBUG: sane_get_option_descriptor (13)
** (simple-scan:9577): DEBUG: Option 13: name='br-y' title='Bottom-right y' type=fixed size=4 unit=mm min=0.000000, max=297.010666, quant=0 cap=soft-select,soft-detect,automatic
** (simple-scan:9577): DEBUG: Description: Bottom-right y position of scan area.
** (simple-scan:9577): DEBUG: sane_control_option (13, SANE_ACTION_SET_VALUE, 297.010666) -> (SANE_STATUS_GOOD, 297.010666)
** (simple-scan:9577): DEBUG: sane_get_option_descriptor (14)
** (simple-scan:9577): DEBUG: Option 14: title='Buttons' type=group size=0
** (simple-scan:9577): DEBUG: Description: Buttons
** (simple-scan:9577): DEBUG: sane_get_option_descriptor (15)
** (simple-scan:9577): DEBUG: Option 15: name='button-update' title='Update button state' type=button size=0 cap=soft-select,soft-detect,advanced
** (simple-scan:9577): DEBUG: Description: Update button state
** (simple-scan:9577): DEBUG: sane_get_option_descriptor (16)
** (simple-scan:9577): DEBUG: Option 16: name='button-1' title='Button 1' type=int size=4 cap=soft-select,soft-detect,advanced
** (simple-scan:9577): DEBUG: Description: Button 1
** (simple-scan:9577): DEBUG: sane_get_option_descriptor (17)
** (simple-scan:9577): DEBUG: Option 17: name='button-2' title='Button 2' type=int size=4 cap=soft-select,soft-detect,advanced
** (simple-scan:9577): DEBUG: Description: Button 2
** (simple-scan:9577): DEBUG: sane_get_option_descriptor (18)
** (simple-scan:9577): DEBUG: sane_start (page=0, pass=0) -> SANE_STATUS_GOOD
** (simple-scan:9577): DEBUG: sane_get_parameters () -> SANE_STATUS_GOOD
** (simple-scan:9577): DEBUG: Parameters: format=SANE_FRAME_RGB last_frame=SANE_TRUE bytes_per_line=7680 pixels_per_line=2560 lines=3508 depth=8
** (simple-scan:9577): DEBUG: Page is 2560 pixels wide, 3508 pixels high, 8 bits per pixel
** (simple-scan:9577): DEBUG: The request failed: The name org.gnome.ColorManager was not provided by any .service files
** (simple-scan:9577): DEBUG: sane_read (7681) -> (SANE_STATUS_GOOD, 7681)
....

** (simple-scan:9577): DEBUG: sane_read (61441) -> (SANE_STATUS_GOOD, 61441)
....
** (simple-scan:9577): DEBUG: sane_read (107521) -> (SANE_STATUS_GOOD, 69120)
.....
** (simple-scan:9577): DEBUG: sane_read (107521) -> (SANE_STATUS_GOOD, 7680)

....

** (simple-scan:9577): DEBUG: sane_read (138241) -> (SANE_STATUS_GOOD, 69120)
** (simple-scan:9577): DEBUG: sane_read (138241) -> (SANE_STATUS_GOOD, 69120)
** (simple-scan:9577): DEBUG: sane_read (138241) -> (SANE_STATUS_GOOD, 46080)
** (simple-scan:9577): DEBUG: sane_read (138241) -> (SANE_STATUS_GOOD, 61440)
** (simple-scan:9577): DEBUG: sane_read (138241) -> (SANE_STATUS_GOOD, 38400)
** (simple-scan:9577): DEBUG: sane_read (138241) -> (SANE_STATUS_GOOD, 7680)
** (simple-scan:9577): DEBUG: sane_cancel ()
** (simple-scan:9577): DEBUG: Sav...

Revision history for this message
sebastian-s (sebastian-s) wrote :

Hi there,
same problem here. Simple-scan works and I saved already a couple of jpegs (siglepage)

Today I wanted to scan 2 pages and save them as pdf
attached is the output from simple-scan --debug >simple-scan.log

Revision history for this message
sebastian-s (sebastian-s) wrote :

this is whats happening on my command line:
$ simple-scan --debug >simple-scan.log
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect

** (simple-scan:2998): WARNING **: ImageMagick returned error code 11, command line was: convert -adjoin /tmp/simple-scan-E81HAV.jpg /tmp/simple-scan-EOSUAV.jpg /tmp/simple-scan-AQ0FAV.pdf

** (simple-scan:2998): WARNING **: stdout:

** (simple-scan:2998): WARNING **: stderr:
Segmentation fault

Revision history for this message
Esteban (jesteban20) wrote :

same problem for me. If I save one page, no problem but if I save 2 pages or more, it crashes.

Sorry for my english

Revision history for this message
Esteban (jesteban20) wrote :

Maybe it would be helpful, I found that if you keep it in *.ps it don't crash.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed the crash if ImageMagick fails. (Note this does not the save from failing if you have a broken version of ImageMagick).

Changed in simple-scan:
status: Incomplete → Fix Committed
Revision history for this message
Jay Gindin (jayg) wrote :

What version of ImageMagick seems to be working? Is it a newer version that what I posted I'm running (7:6.5.1.0-1.1ubuntu3)? Is it perhaps a missing dependency? Or, if you're not sure, could you post the version(s) you have tested with?

Thanks,

jay

Revision history for this message
sebastian-s (sebastian-s) wrote :

Hi Robert,
thanks for the quick fix

Was is a simple-scan bug at all? and what version of simple-scan will contain the fix?
Does it require a particular Imagemagick version?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

It appears the Karmic version of ImageMagick has a bug - it works fine in 10.04 (7:6.5.7.8-1ubuntu1). If you are experiencing it please file a bug against the Karmic package (if one does not already exist).

The bug was simple-scan not correctly handling ImageMagick failing:
http://bazaar.launchpad.net/~robert-ancell/simple-scan/trunk/revision/374

Revision history for this message
Robert Ancell (robert-ancell) wrote :

sebastian-s, no particular version is required, just that the following command works:
$ convert -adjoin file1.tiff file2.jpeg output.pdf

(note that the use of ImageMagick is a workaround until cairo supports compressed images in PDF files, this should also speed up the saving process).

Revision history for this message
Alejandro Cuervo (a-cuervo) wrote :

Same here.
Saving 2 pages as PDF crashes.
Saving 2 pages as jpeg works.

Revision history for this message
Alejandro Cuervo (a-cuervo) wrote :

See complete simple-scan -d log file

Changed in simple-scan:
status: Fix Committed → Fix Released
Revision history for this message
S. Hisken (stijn-hisken) wrote :

Had the same problem at Ubuntu 9.10 using Simple Scan 1.0.3, upgrading imagemagick using this PPA solved my problem: https://launchpad.net/~raimar-sandner/+archive/ppa

Revision history for this message
nunatak (nunatak) wrote :

Since yesterday I have similar problems with simple-scan. Before it allways worked fine! But yesterday, after scanning some pages it crashed while saving to PDF. The first time I get this message from shell:

http://paste.ubuntuusers.de/399258/

simple-scan shut down and the file was corrupt.

And next, I scaned one a few pages and saved it without error. But afterwards I get another message while simple-scan brokes:

http://paste.ubuntuusers.de/399259/

I think the error this time occured at the end of saving-process, because the PDF was created correct.

The current used version of simple-scan is 2.32.0 with Ubuntu 10.10

Revision history for this message
Laurent Bauvens (laurent-bauvens-8) wrote :

I still experience this bug with Simple Scan 3.4.3 for Linux Mint 13 (Maya) 64 bit with Gnome 3.4.2.

It appears there isn't a fixed version avalaible in standard application repositories.

Revision history for this message
Michael Nagel (nailor) wrote :

please open a new ticket, i am not sure that you hit the exact same bug.
please check Bug #843361 , and if possible please check the current development version

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.