This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
There is a slowness detector which is helpful if the GUI freezes for a while but then recovers. However if the GUI freezes and does not recover - say because there is a deadlock in EQ, or some action goes into a busy loop as in bug #179519 - there is no good way for the user to fix the problem. If you use http://jrunscriptin.kenai.com/ and know a bit of JavaScript it is possible to find the EQ thread and kill it. But this is a lot of work and certainly not something we can recommend to any user.
As of core-main #89cc8dfb1b14 you can simply start NB again (with the same userdir) using your usual shortcut or whatever. Normally this would front the main window of the running NB instance; but if EQ does not respond for ten seconds, this will now kill the EQ thread, which AWT handles by simply restarting it. In practice this seems to be an acceptable way to recover, at least long enough to save modified files and so on.
Checking whether the thread "stands still" via comparing getStackTraceElements() during the 10s, would prevent accidental termination of long functionality (if they were not caught by slowness detector earlier).
(In reply to comment #2) > Checking whether the thread "stands still" via comparing > getStackTraceElements() This would catch deadlocks but would not generally catch busy loops. > prevent accidental termination of long functionality Remember that this only happens if you launch a CLI command. If the IDE is just taking a long time you can wait for it and nothing will be terminated. BTW currently when EQ is interrupted, a stack trace (from EQ) is logged at WARNING, suitable for the exception reporter. The slowness detector will also generally offer to report a problem, so there is some potential overlap. I am not sure if it would be better to log the stack trace at INFO and rely exclusively on the slowness detector to report the problem.
Integrated into 'main-golden', will be available in build *201001190201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/89cc8dfb1b14 User: Jesse Glick <jglick@netbeans.org> Log: #179597: ability to recover from a GUI freeze.