Results 1 to 3 of 3
Thread: Program hangs
- 10-27-2009, 10:00 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 2
- Rep Power
- 0
Program hangs
Hello
I have a Java program which sometimes works OK untill the very end, but sometimes just hangs in a random moment and doesn't react to Ctrl+C or Ctrl+Break. Process doesn't use CPU, so I guess it isn't something like infinite loop (I actually cannot think of places in my program where this kind of loop may occur). I tried to get thread dump to see if there are any deadlocks, but Ctrl+Break doesn't work and jstack doesn't work also (I've read that there is -F option, but it isn't available on Windows). Also I tried to connect to a hanged process with Java Visual VM - doesn't help too (just says 'Connecting...' forever).
I tried to start my program, connect with Java Visual VM to it at the beginning and see how threads visualisation will look like in a moment when program hangs. My programm died after about 50 min and all info which I was able to see was about this period of time (e.g. a timeline diagram stopped changing and the last time mark was 49:23), but Java Visual VM was still connected to a process. I pressed Thread Dump button, it worked, but there was nothing 'criminal' on the dump it provided. So I guess maybe it is not actual thread dump, it is something that Java Visual VM was able to get before process hanged.
What else can I do to find out what's going on in my programm and fix it?
I tried to run it with JDK 1.6.0_07 and 1.6.0_16. I'm using Windows Vista Enterprise SP1, 64-bit.
Thanks in advance, Yulia.Last edited by yuliada; 10-27-2009 at 10:08 PM.
- 10-28-2009, 11:27 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
Sprinkle some System.out.println( ... ) statements in the busiest parts of your program, let it run and see what happens ...
kind regards,
Jos
- 11-11-2009, 03:58 AM #3
Member
- Join Date
- Oct 2009
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Applet hangs while using JOptionPane.xxx()
By Basit in forum Java AppletsReplies: 3Last Post: 08-08-2009, 06:18 PM -
Discussion: JVM hangs
By Arica in forum Advanced JavaReplies: 5Last Post: 06-29-2009, 04:29 AM -
java mail hangs
By ashwinkumar18 in forum Advanced JavaReplies: 6Last Post: 03-14-2009, 10:38 AM -
[SOLVED] Multiple client single server problem(it hangs halfway)
By kellaw in forum Threads and SynchronizationReplies: 4Last Post: 10-03-2008, 07:41 PM -
[SOLVED] Multiple client single server problem(it hangs halfway)
By kellaw in forum NetworkingReplies: 1Last Post: 10-02-2008, 07:02 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks