Modify

Opened 16 years ago

Closed 16 years ago

#2937 closed defect (fixed)

Huge memory requirements for image import

Reported by: Chris Bainbridge <chris.bainbridge@…> Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

If I use Java with a 1200MB heap and do an image import from a .gpx file the resident memory of the Java process increases massively, eventually using >1GB before the oom-killer kicks in and kills the process. I have about 45 photos of 105MB total. Using josm-r1779.

With a standard heap size I get the error:

java.lang.OutOfMemoryError: Java heap space

at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
at java.awt.image.Raster.createPackedRaster(Raster.java:458)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

I have 1.5GB memory so Josm should be able to index 105MB of photos. I wonder if they are all being loaded simultaneously rather than being loaded on demand? Or if there is a memory leak somewhere?

Attachments (0)

Change History (2)

comment:1 by Chris Bainbridge <chris.bainbridge@…>, 16 years ago

The photos are high resolution 8 megapixel. Lowering resolution beforehand reduces the problem: mkdir s; for x in *.jpg; do convert $x -resize 1024x768 s/$x; done . Now use the lower resolution directory.

comment:2 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

The geoimage code was replaced by the AgPifoJ Plugin. This is no longer an issue.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.