We have a Desktop application written in swing which basically uses JGO (www.nwoods.com/go/jgo.html) objects for making test scripts visually which are then used for testing mobiles. We are using Java 5 but in recent days we are experiencing a strange problem. When we have a script which takes more than 10 minutes to run, if we run the script and minimize the application and dont do anything on the machine, the application hangs. We can forcefully maximize the application by using the Windows Task Manager but that it. The application is stuck doing nothing and no response. It is possible that we might have this bug in our previous releases but this has been reported recently by Google (one of our valued customers).
Anyone else has encountered the same issue? Any suggestinos or advice is welcome.
Just to add I figured out the issue. Actaully we show a Modal Dialog box showing the results of the script run to user. Now when the application is minimized this dialog gets lost altough we have set the references to the parent window correctly but some how it nevers hows up. Since the dialog box is modal the user gets the impression that the application is hung but thats no the case. If u just hit the Esc key (same as cacnelling the dialog) everything works smoothly.
I fixed up the issue by putting in a hack; thats all that I could think of that time. I checked the application state before showing the dialog if it was minimized then I added in the dialog showing task to a TaskQueue utilizing the command pattern. As soon as the application was maximized I ran through all the pending tasks in the TaskQueue and then Modal Dialog was shown, resolving the issue.
If anyone is need of the code snippet please letr me know I will add it up here.