I've been working on a what is becoming an ever more and more complex desktop app using swing (something on par with an extremely paired down IDE). And the application is begining to lockup/freeze and I can't really point to any piece of code that is doing it. No exceptions are being thrown, it doesn't seem to rely on any particular events. When the problem occurs my cpu "usage" hits about 50% and stays there. The most reliable way to trigger the happening is simply by scrolling a table (I don't have any listners on the scrollpane).
I wouldn't expect anyone to tell me exactly what the problem is (especially w/o the code and I wouldn't expect anyone to sift through the hundreds/thousands lines anyhow).
But I would love any suggestions for going about debugging such a problem. I would think the problem is thread lock somewhere, but really the problem started before I created/used any other threads (although I have started to go back and use foxtrot to try to make the gui more responsive).
Note that if the problem is deadlock, CPU usage would be 0 when it was hung, not 50%.
You can get full thread dumps by pressing Ctrl-Break (Windows) or Ctrl-\ (real computers) in the console you launch the program from. Try this when it hangs, have a look at the stack dump, and you'll see where each thread is at that time.