simple-scan allocates memory for one page (possibly a lot) on startup

Bug #598703 reported by Paul Natsuo Kishimoto
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Low
Unassigned

Bug Description

1. Begin a scan at a high resolution. Observe memory usage.
2. Kill simple-scan (using "killall simple-scan" from a terminal)
3. Restart simple-scan. Observe memory usage.
4. Lower resolution (Documents → Preferences) and begin a new scan. Observe memory usage.

I ran into this problem after (ambitiously) trying to scan a full A4 page at 1200 dpi on a machine with only 1 GB RAM (bad idea). Once memory usage hit ~97%, I gave up and killed the application.

However, everytime I would restart it afterwards, it would *immediately* grab almost as much memory. I tried clearing the contents of ~/.cache/simple-scan, as well as some .tiff files I found in /tmp, to no avail.

The memory usage didn't drop until I performed steps 3 and 4 as explained above.

$ apt-cache policy simple-scan
simple-scan:
  Installed: 1.0.3-0ubuntu1
  Candidate: 1.0.3-0ubuntu1
  Version table:
 *** 1.0.3-0ubuntu1 0
        500 http://utormirror.utoronto.ca/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     1.0.2-0ubuntu1 0
        500 http://utormirror.utoronto.ca/ubuntu/ lucid/main Packages

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

This is due to the blank page that is created when simple-scan starts - it uses the dimensions of the last scanned page. Simple Scan should be smarter and not allocate any memory for this page.

(the last page dimensions are stored in gconf)

Changed in simple-scan:
status: New → Triaged
importance: Undecided → Low
Michael Nagel (nailor)
summary: - Memory usage high after a kill/restart
+ simple-scan allocates memory for one page (possibly a lot) on startup
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This appears long since fixed. Couldn't pinpoint the exact version but must be quite old.

Changed in simple-scan:
status: Triaged → Fix Released
Revision history for this message
Geoff (hcopse) wrote :

   This bug is not fixed. If SS crashes due to lack of memory, there can be no way to recover without editing gconf. I speak from experience having had a scan crash and SS would not then start and run. Uninstalling and reinstalling SS did not remove the problem. A reinstall should IMO rewrite SS to the default state. The average user should not have to delve into gconf to recover from a system crash. Is the answer to convert photo scans (2400 dpi) to .jpg on the fly to minimise the memory usage?

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.