Results 1 to 5 of 5
  1. #1
    java_dude is offline Member
    Join Date
    Jan 2011
    Posts
    6
    Rep Power
    0

    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.
    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?
    Thanks a lot!

  2. #2
    hosscomp is offline Member
    Join Date
    Oct 2010
    Posts
    63
    Rep Power
    0

    Default

    You will likely have to do some good ol'e fashioned debugging. I have no idea what is different when it is iconified. I think I would try to comment out (or replace with stubs) the suspected problem areas to narrow it down to where it is happening and go from there.

  3. #3
    java_dude is offline Member
    Join Date
    Jan 2011
    Posts
    6
    Rep Power
    0

    Default

    hi hosscomp,
    Thanks I found the problem. With JConsole and Memory analyzer it became clear that the memory leak was due to an unclosed database statement.
    Thanks for your help.

  4. #4
    AK2000 is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Unhappy Using serial port com with Java?

    I am a new bee to Java. I am looking to see how to transfer data to and from a serial port in Windows XP, Vista and 7 using Java. I did a search and yours is the latest i can see that talks about a working project in windows using the serial port. Can you please give me some details on how you got it to work. I looked into javax.comm but looks like I will need rxtx close which I can not find.

    Any information in this regard wuld be of great help.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Similar Threads

  1. Replies: 4
    Last Post: 11-12-2010, 04:25 AM
  2. Replies: 4
    Last Post: 01-10-2010, 07:48 AM
  3. change url in parent window from child window
    By rakesh_n_mehta in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-09-2009, 12:17 PM
  4. Replies: 2
    Last Post: 08-21-2008, 07:33 PM
  5. Open a shell minimized (iconified)
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-25-2008, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •