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

Scenario doesn't validate PULSE DURATION, throws ArithmeticException for illegal values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • fx1.0
    • javafx
    • None

      com.sun.scenario.Settings.set("com.sun.scenario.animation.pulse", "1001");

      results in:

      java.lang.ArithmeticException: / by zero
              at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.updateNextPulseTime(AbstractMasterTimer.java:288)
              at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.getDelay(AbstractMasterTimer.java:253)
      ...

      Any value higher than 1000 causes this exception, probably because the runtime uses milissecond precision for PULSE_DURATION and any value > 1000 results is rounded to 0 somewhere.

      Negative values (like -1) cause no harm, just like 0 they mean "default duration from monitor's frequency".

            kcr Kevin Rushforth
            odoederlejfx Osvaldo Pinali Doederlein (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: