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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: fx1.0
    • Component/s: 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".

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

              Created:
              Updated:
              Resolved:
              Imported: