Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Memory increases until window is minimized

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Memory increases until window is minimized

    Hi guys!

    I have developed a java swing application loggin serial com port messages. It starts and runs fine for a couple of days, but hangs after some time. After some research the com port handling does not seem te be the problem.

    I checked the memory usage and it seems that memory increases slowly but steadily. My application makes intensive use of the interface (swing) since it logs messsages every second or less. The strange thing is that when I (literally) minimize the program (in windows) the memory use drops to 20MB to go up fast to 70MB and then increase slowly (between 20k and 100k a second) This seems to go on indefinatly (i have waited several times until it went above 150MB). Then when i maximize the window nothing happens but when i minimize it again the memory cycle restarts: drops to about 20MB then 70MB quikly and then slowly indefinitly.

    The VM-size in the task manager stays at 251MB...

    My application has to run forever in more or less the background and it crashes after a couple of days. Is this memory issue related to this freezing/hanging?

    How can this be solved?


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Memory increases until window is minimized

    Hello java_dude,

    This does sound strange. If possible, we will need to see all your code to be able to figure this one out.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,354
    Thanks
    182
    Thanked 832 Times in 775 Posts
    Blog Entries
    5

    Default Re: Memory increases until window is minimized

    Evidently solved in a crosspost.

Similar Threads

  1. JTable memory consumption
    By drdanielfc in forum AWT / Java Swing
    Replies: 3
    Last Post: November 27th, 2010, 11:30 PM
  2. Memory Handling -de allocate memory in Java
    By 19world in forum Java Theory & Questions
    Replies: 4
    Last Post: June 15th, 2010, 05:05 AM
  3. Out of Memory Error
    By wasaki in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 31st, 2010, 04:37 PM
  4. free memory of bufferedimage
    By mr_empty in forum Java SE APIs
    Replies: 2
    Last Post: January 19th, 2010, 06:14 AM
  5. Java memory management
    By trueacumen in forum Java Theory & Questions
    Replies: 5
    Last Post: August 12th, 2009, 03:40 AM