943,846 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 5603
  • Java RSS
Aug 20th, 2004
0

Out of memory

Expand Post »
I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards.

Please Advise
Similar Threads
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004
Aug 20th, 2004
0

Re: Out of memory

Quote originally posted by nanosani ...
I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards.

Please Advise
It's not okay to have that exception. My "Please Advise" is that you post code so we can at least see what you're trying to do.

Unless you're loading large amounts of data into memory (i.e. more than will fit in the memory allocated to the VM), this shouldn't happen. A common cause of this problem is some sort of out-of-control recursion. Try running your code with some sort of stack trace enabled so you can find at what point in your code the exception is being raised.

--sg
Reputation Points: 182
Solved Threads: 71
Posting Pro in Training
gusano79 is offline Offline
475 posts
since May 2004
Aug 20th, 2004
0

Re: Out of memory

Hey sani,

What does this code do? are you doing lots of I/O? or creating many objects?

Ed
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004
Aug 21st, 2004
0

Re: Out of memory

OOPs ! one of so many loops in my code was not terminating n it was consistantly writing into the memory :o . Thanks for the help fellas.
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Conversions
Next Thread in Java Forum Timeline: DrawHouse Code Problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC