[BLUEJ-138] Closing debugger window appears to mysteriously hang the system
If you set a breakpoint and run the code to hit it, the debugger window pops up. If you then simply close the debugger window, the VM is still tied up with the running process, and so while BlueJ is still responsive (menu access, etc) anything to do with the objects themselves appears to mysteriously hang. For instance, if you go to create an object, the creation dialog pops up, but when you click ok, you just get a spiralling cursor, and can't even click cancel. "Nothing" appears to work other than force-killing BlueJ and all Java processes.
In fact, the workaround is simply to go to the View menu and select "Show Debugger", then click Continue?the original debugged process will finish, and then the hung object creation executes and you're all fine and dandy. Terminate also works, though of course it also cancels the object creation.
It could possibly be classified as a PEBKAC error, but it's a common one and seems to arise most among students who have a more Windows-based understanding of windows, where closing the window tends to terminate the activity. Most of my students ran into this problem over the course of a lab (invariably reported as "BlueJ is hanging"), before I finally figured out what was actually going on and told them the real workaround.
The fix, I think, is that it should not be possible to close the Debugger window while the VM is paused like that. If someone tries to close the window, there should be a dialog that warns them that this will terminate the method calls being debugged, and if they click OK to that, it should be equivalent to Terminate. Alternatively, any other VM-ish action that someone tries while the VM is paused for debugging (e.g. object creation) should pop up a dialog saying that that operation can't be done in the middle of debugging (which would remind people that there's a debugger waiting for them).
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 2.5.2