Exception in thread "Image Fetcher 0"

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Exception in thread "Image Fetcher 0"

Post by cormullion »

I'm getting a few of these in a script, which is displaying a succession of images in a canvas.

Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space

although they don't seem to be stopping execution of the script... Is it serious?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Whenever you are using gs:draw-image (or any other gs:draw-xxx or gs:fill-xx) function a piece of memory gets occupied for the new graphics object created. Perhaps you should do a gs:delete-tag on images not displayed any more?

Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

yes - I hope I'm doing that. Perhaps it's a corrupt JPG or something that's upsetting things. Will continue investigating...

thanks Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

After investigation, I've found that it's happening when a high-res JPG image is displayed. Say the picture is about 4MB, 3456 pixels by 2304, needing to be scaled by 0.369 to fit on the screen. It generates the exception:

Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space

is there a way to adjust the heap space?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

It its -Xms <nnn> for initial size in <nnn> or -Xmx <nnn> for maximum size, when starting Java.

Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Thanks! I've set it to -Xmx150m , which seems to be enough. (:-)

Locked