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

    Default Serial Comm freeze

    Hi guys!
    I do have a problem with a java program reading from a serial com port. I read sentences and handle some of them (!) in a database. Another application is querying the database. The problem is that the com port reading program sometimes freezes after some time (1day, 2 days...). It does not respond any more. Is it possible that there are to many incoming sentences filling the com buffer and freezing the com reading and database writing program? May this be due to slow database writing?
    The program restarts if any exception (com or database) is encountered.
    Many many thanks for your help!
    Best.

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

    Default

    Also the serial ports are through ethernet converters or USB to serial converters.
    It handles exceptions and closes the port when exception occurs.
    Thanks.

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

    Default

    Hi there,
    I have found something. 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!

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

    Default

    Solved!
    It was a memory leak due to an unclosed database statement.

Similar Threads

  1. GIOVYNET Java Serial Comm Port Question
    By the_justin in forum New To Java
    Replies: 1
    Last Post: 11-30-2010, 12:13 PM
  2. Replies: 1
    Last Post: 07-30-2010, 08:29 AM
  3. Replies: 7
    Last Post: 07-12-2010, 04:24 PM
  4. [SOLVED] How To Freeze Tab/s from JTabbedPane
    By javanewbie in forum New To Java
    Replies: 2
    Last Post: 06-10-2009, 09:42 AM
  5. freeze radioButton without disable them
    By itaipee in forum AWT / Swing
    Replies: 5
    Last Post: 05-25-2009, 09:29 AM

Posting Permissions

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