Re: java.lang.OutofMemoryError

Hi Nash'at,

> Thanks Bill,
> I ran it using java -mx256m and I was able to do a lot of re-displays
> before I got that error again. I have a question though- I thought that
> Java does automatic memory management. Once I clear the display, it should
> release all the memory, but it seems that somethings are kept causing
> the application to crash at a later time. Can you give some insight
> on this?
> Any suggestion/help would be appreciated.

I am taking the liberty of CC'ing this to the VisAD mailing
list since this issue may be of general interest.

There are still some memory leaks in Java3D.  One of the
reasons we are working so closely with the Java3D team at
Sun is to make sure that VisAD will be able to use the new
Java3D version 1.2.1 (1.2 and 1.1.3 throw Exceptions that
make them unusable with VisAD).  Version 1.2.1 will include
fixes for many memory leaks and other memory use problems.

Also, Sun's Java3D team recently helped us to find a memory
leak in VisAD (leaks can occur in Java code if you have
Vectors that grow indefinately).  I have just updated the
VisAD ftp server with the fix for this memory leak.  It
occured if you repeatedly called DisplayImpl.removeReference()
and DisplayImpl.addReference().  However, if you just leave a
DataReference linked to your DisplayImpl and change you data
by repeated calls to DataReference.setData(), or by calls to
Field.setSamples(), then your memory leak is probably in
Java3D rather than in VisAD.  You may also want to look for
Vectors that grow indefinately in your own code.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: