Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8119105

Still cannot rely on Thread.setDefaultUncaughtExceptionHandler() to work with JavaFX App Thread.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Java 1.8.0ea b90

      Description

      Since bug RT-15332 is fixed I was testing to make sure my application's uncaught exception handler was working properly and I noticed that the only way to have the JavaFX application thread make use of it is to set it specifically using Thread.currentThread().setUncaughtExceptionHandler().

      My application already makes use of Thread.setDefaultUncaughtExceptionHandler() to make sure any new threads deal with exceptions in a consistent manner so it would be ideal if the JavaFX thread worked like this as well.

      It looks like this happens because JavaFX already sets its own uncaught exception handler which means the thread never delegates handling to its ThreadGroup which would make use of the "default" uncaught exception handler. Plus I believe that the specific JavaFX exception handler is very similar to ThreadGroup's handling when no outside handlers are set...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              art Artem Ananiev
              Reporter:
              csmithjfx Charles Smith (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: