Reputation: 58
While doing some homework that works with some swing gui components, my program started crashing seemingly at random. That is, it starts, runs for a short time, and then crashes. I don't get any errors in the console, it's just a straight up crash.
I don't doubt that it is something I wrote, and I'm more than happy to show code if anyone wants to look at it, but is there anything that I can do myself to track down what might be the cause of my crashes?
Some other information that might be useful:
Upvotes: 2
Views: 741
Reputation: 205795
Some possible heuristics:
Crashes that occur seemingly at random suggest incorrect synchronization; look for event dispatch thread violation using one of the approaches cited here.
Verify that all exception handlers produce diagnostic output; run from the command line to ensure that diagnostic output has not been inadvertently redirected.
Try running under the aegis of a different debugger, e.g. NetBeans.
Try running under the aegis of a profiler.
Try a different version of the JDK/JRE.
Try a different host OS.
Upvotes: 2