What happens within my program is that within about 10 seconds of running my prog, my CPU usage reaches 100 and stays there, making it close to impossible to continue running the program (or any other programs on my comp) normally.
My program basically uses one thread which is initialised explicitly. This is used to control the refreshing of a canvas object within a gui. All the main function is responsibke for is drawing the gui, initialising objects and then attaching actionlisteners to the buttons of the gui. The gui buttons are used to edit an object containing data for the graphical representation of a network, which is then plotted using an object drawing to a canvas which was previously added to the gui.
I have used JProfiler to try and see where the problem lies, here is what I found out about all the different threads:
What is happening is that the AWT - EventQueue-0 Thread becomes active from time to time even if I just leave the program running without using it.
The main thread terminates after about 12 seconds (as the only thing it actually does is it dreaws the GUI, initialises the different objects the program uses and then adds actionevents to buttons. It then terminates. Is a possible cause of the problem that the main thread terminates while a display which was generated by it is still running?
The other threads which seem to be present (but are waiting for almost the whole of the time) are Java2D Disposer, the thread resposible for the painting (which doesnt seem to do any thing at all, even thought the painting was actually done), AWTShutdown (which is waiting at all times too), DestroyJava VM (also always waiting), 2 Image fetchers which are only created for about 4 secs each and are only runnable for about 0.1 seconds and a Timer Queue thread (which is only initialised just before the 1st Image fetcher is terminated) which then keeps waiting forever.
Any help at all would be very useful,