Java out of memory

Post Reply
Sampi

Post by Sampi »

Hello. I tried searching the forums for this but I didnt find anything. When doing the Time Trial, after a few problems the applets stop loading. I check my java console and it says:

Exception in thread "AWT-EventQueue-1" java.lang.OutOfMemoryError: Java heap space

I'm using Firefox but it doesn't work with IE either. My Java settings say that there is no limit to the amount of memory Java applets can use. Any ideas?


{Posted by Sampi}
Sas

Java out of memory

Post by Sas »

I'm having the very same problem.
After solving a certain number of problems in Time Trial it won't load another problem, and when I check with Task Manager I see that Firefox takes a lot of memory.
Also, I noticed that after I solve a problem and go to the next one the memory used by Firefox is increased. I think that the program is not releasing the last problem from the memory after the next one is called and all the memory is being used untill it can't load another problem.
If the one who wrote the code for the application will look into it he will be able to say if that's it (I don't use Java so I can't check my self).

P.S the memory is not released untill the browser is closed.

{Posted by Sas}
admin

Post by admin »

hmmn, that's unforunate. as java is a garbage-collected language, there should be no need to free allocated memory. unfortunatley, many jvm's and browser implementations of java are very buggy.

adum

{Posted by admin}
Sampi

Post by Sampi »

The problem ends with Firefox 2.0 (at least on Linux). Has anyone had this problem with Firefox 2 on Windows?

{Posted by Sampi}
kovarex

persists

Post by kovarex »

Problem persists on
Firefox 2.0.0.3 (Latest version) and to Java 1.6.0 (Latest version), and the problem still persists

Approximatly 2Mb on every new page, the garbage collector should work fine, are u sure u have no circular pointers in the structure?

{Posted by kovarex}
admin

Post by admin »

well, when a page closes, circular pointers or no, all data should be tagged for deletion. when a page closes, there are no more references into the structures that existed.

the other thing is that a jvm doesn't necessarily free memory as soon as it can. if you manually tell it to run the gc does it still appear to leak?

adum

{Posted by admin}
kovarex

memory

Post by kovarex »

The problem is still here, and I believe I'm not the only one facing it.

When I solve problems, every problem makes firefox to eat at least 5 more Mb of memory (I believe the size is dependent on size of the problem tree).

I think this is quite important issue, did u try to make make destructors for suspicious classes?

You could try to manualy delete the applet or something like that.

I'm willing to help with this.

{Posted by kovarex}
Post Reply