Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
J2SE Version (please include all output from java -version flag): java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) Does this problem occur on J2SE 5.0.x or 6.0? Yes / No (pick one) Yes Operating System Configuration Information (be specific): Microsoft Windows XP [Version 5.1.2600] Bug Description: Regression: Some Uncaught Exceptions are no longer getting sent to the Uncaught Exception Handlers In 1.4(merlin-beta) problem 4063022 was addressed such that the Uncaught Exceptions would be sent to the Uncaught Exception Handlers In 1.4(merlin-beta3) due to report 4499199 this was broken again such that during a modal dialog Uncaught Exceptions would not be sent to the Uncaught Exception Handlers The EventDispatchThread.processException makes note of this and states that: It may be useful to add either a runtime flag or API later if someone would like to instead dispose the dialog and allow the thread group to handle it. However all the bugs relating to this seem to have been closed as fixed even though this problem still exists in 1.6.0_07. The fix should be very simple replace the EventDispatchThread.processException code with this: Thread thread = Thread.currentThread(); thread.getUncaughtExceptionHandler().uncaughtException(thread, e); And change the UncaughtExceptionHandler JavaDoc slightly as in this case the Thread wont be terminated. It is not clear why one Event Queue Thread would be terminated and then another one started doing the same thing when not isModal (the problematic event has already been removed from the queue), however if there really is a need for this then just the if (isModal) section of EventDispatchThread.processException can be replaced with the above code.
|