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.
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.
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.
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.