simple-scan fails to save a large scanned document

Bug #599643 reported by kornelix
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Undecided
Unassigned
simple-scan (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: simple-scan

When trying to save a large scanned document (80+ pages), simple-scan processes
for several minutes and then fails with the following message:

ImageMagick returned error code 9
Command line: convert -adjoin /tmp/simple-scan-XRTTEV.tiff ... /tmp/simple-scan-M8YUEV.pdf
Stdout:
Stderr:

(the command line was actually 2552 characters long and had 87 file names)

After deleting 30 pages from the same document using the simple-scan GUI
(right click on a page, delete), the save command worked OK.

Maybe there is a limit on the command line length or the allowed file (page) count.
If so, "error code 9" is a poor message and the limit should be raised.

I am using Ubuntu 10.04 and the installed version of simple-scan is 1.0.3-0ubuntu1.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: simple-scan 1.0.3-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Jun 29 07:24:55 2010
DriverPackageVersions:
 libsane 1.0.20-13ubuntu2
 libsane-extras N/A
 hplip 3.10.2-2ubuntu2
 hpoj N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
MachineType: MSI MS-7593
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-22-generic root=UUID=423c3835-9ec3-4215-a2e1-82240f41b9eb ro quiet splash
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: simple-scan
dmi.bios.date: 04/17/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V1.2
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: MSI X58M (MS-7593)
dmi.board.vendor: MSI
dmi.board.version: 1.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV1.2:bd04/17/2009:svnMSI:pnMS-7593:pvr1.0:rvnMSI:rnMSIX58M(MS-7593):rvr1.0:cvnMICRO-STARINTERNATIONALCO.,LTD:ct3:cvr1.0:
dmi.product.name: MS-7593
dmi.product.version: 1.0
dmi.sys.vendor: MSI

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

This is fixed in the next version, you can try it here:
https://edge.launchpad.net/~robert-ancell/+archive/simple-scan

Changed in simple-scan (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
bojo42 (bojo42) wrote :

can't confirm that the fix works with 2.31.4-0ubuntu2 from your PPA on lucid. when scanning text with 300 DPI and 27 pages it produced a "empty, white" PDF that even though matches the size of the same sucessful scans with 1.0.3-0ubuntu1. seems that the conversion isn't taking place as the saving process seems to be too quick. is "convert -adjoin" still used?

BTW a good workaround is to use "Print to PDF", this will give you a PDF that has a bigger size, but you don't need to rescan everything or cp/rsync the temporary files from /tmp and run "convert -adjoin" manually (with lesser files at one run).

Changed in simple-scan (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
bojo42 (bojo42) wrote :

Sry Robert but i need to reopen, as it at least also happens with 2.32.0-0ubuntu4 backported to lucid, though the reason is different.

I tested it on 300 DPI Text profile. Saving 43 pages worked. But scanning further until about the double amount of pages saving crashes the app:

GLib-ERROR **: /build/buildd/glib2.0-2.24.1/glib/gmem.c:137: failed to allocate 26779794 bytes
aborting...
Aborted

While saving it already produced a 25,4 MB PDF that get corrupted on crash. Maybe this is due to too low memory. I did it on a machine with 1 GB RAM, before starting Simple Scan memory usage was 290 MB and did not run something else during scanning.

This should be revalidated on maverick.

To reproduce:
1. Put a page on the scanner and leave it there the whole time.
2. Run "simple-scan -d > ~/simple-scan.log" in a terminal.
3. Use Tab to focus the "Scan" button.
4. Press "Return" multiple times (say about 50 times or more).
5. Do something else until you got a lot of pages scanned.
6. Try to save.

Changed in simple-scan (Ubuntu):
status: Fix Released → Confirmed
bojo42 (bojo42)
Changed in simple-scan:
status: New → Confirmed
Revision history for this message
bojo42 (bojo42) wrote :

I retested it on a machine with 4 GB and i was able to do about 160 pages at 300 DPI, so this was really due to low memory. Therefore Bug #525441

Revision history for this message
bojo42 (bojo42) wrote :

is more suiting my complaint.

Changed in simple-scan:
status: Confirmed → Fix Released
Changed in simple-scan (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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