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 246580 - Focus problems when an infinite amount of exceptions is being thrown
Summary: Focus problems when an infinite amount of exceptions is being thrown
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Logger (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-20 13:31 UTC by Martin Entlicher
Modified: 2014-08-22 12:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
requestFocus() stack trace (1.92 KB, text/plain)
2014-08-20 13:31 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2014-08-20 13:31:14 UTC
Created attachment 148792 [details]
requestFocus() stack trace

Sometimes it happens, that an infinite amount of exceptions is thrown by the IDE. See e.g. issue #246562.

The problem is, that the exception dialog steals focus on each exception reported. Therefore it's hard to even kill the IDE.

The attached stack trace shows how the requestFocus() is called from NotifyExcPanel.
Comment 1 _ gtzabari 2014-08-20 14:57:30 UTC
Suggestion: only requestFocus() the first time the exception reporter dialog is created. Subsequent exceptions should not requestFocus(). The idea being that users will close the Exception Reporter after submitting a report (or simply close it if they wish to ignore the error). On the other hand, if the Exception Reporter is already open, the user already knows about it because it stole keyboard focus a second ago.
Comment 2 Stanislav Aubrecht 2014-08-22 09:33:18 UTC
There's no good fix for this problem. Even skipping org.netbeans.core.windows.services.NbPresenter.requestFocusForMessage still transfers input focus to the exceptions window as later on Dialog.show() gets called which results in requestFocus() being called on some of the dialog components.

The only solution is to rewrite the exception reporter window not to use Dialogs API and manage the dialog on its own. Any other fix is very likely to introduce regressions in other parts of the IDE.