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

RejectedExecutionException should not be thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u45
    • javafx
    • None

      As discussed in the mailing group: when the JavaFX rendering gets a task to render but is actually shutting down, it throws an exception:

      java.util.concurrent.RejectedExecutionException: Task com.sun.javafx.tk.quantum.PaintRenderJob@33cf88 rejected from com.sun.javafx.tk.quantum.QuantumRenderer@1133212[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 30]
               at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
               at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
               at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
               at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
               at com.sun.javafx.tk.quantum.QuantumRenderer.submitRenderJob(QuantumRenderer.java:218)
               at com.sun.javafx.tk.quantum.QuantumToolkit.addRenderJob(QuantumToolkit.java:467)
               at com.sun.javafx.tk.quantum.ViewScene.repaint(ViewScene.java:140)
               at com.sun.javafx.tk.quantum.PaintCollector.renderAll(PaintCollector.java:435)
               at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:526)
               at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:505)
               at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$400(QuantumToolkit.java:334)
               at com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$47/14510047.run(Unknown Source)
               at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
               at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
               at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101)
               at com.sun.glass.ui.win.WinApplication$$Lambda$43/19282349.run(Unknown Source)
               at java.lang.Thread.run(Thread.java:745)

      The developer or the user cannot do anything with this exception, and it just is cause for uncertainty of the execution of the program. Perhaps Quantum should just set a custom reject handler that ignores the issue instead of throwing, or activate the throwing via a command line switch.

            kcr Kevin Rushforth
            tbee Tom Eugelink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: