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.

Bug 179597 - Ability to recover from GUI freeze
Summary: Ability to recover from GUI freeze
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 183329 194917 197441 198918
Blocks:
  Show dependency tree
 
Reported: 2010-01-17 16:02 UTC by Jesse Glick
Modified: 2011-06-10 18:29 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-01-17 16:02:11 UTC
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.
Comment 1 Jesse Glick 2010-01-17 16:07:32 UTC
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.
Comment 2 Jaroslav Tulach 2010-01-18 07:25:13 UTC
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).
Comment 3 Jesse Glick 2010-01-18 10:35:36 UTC
(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.
Comment 4 Quality Engineering 2010-01-18 23:37:22 UTC
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.