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

Dependence on java.util.Timer freezes screen when OS time resets backwards

    Details

      Description

      FULL PRODUCT VERSION :
      OpenJDK Zero VM (build 25.66-b00, interpreted mode)

      ADDITIONAL OS VERSION INFORMATION :
      Local Linux build (ARM core)

      A DESCRIPTION OF THE PROBLEM :
      MonocleTimer relies internally on java.util.TimerTask. A well-established bug with Timer and TimerTask (see e.g. https://bugs.openjdk.java.net/browse/JDK-4290274) means that if the OS clock gets set back a few minutes, the Timer stops scheduling.

      The effect of this on Monocle applications is that in the event that the OS clock goes back, the display freezes, because QuantumToolkit stops pulsing the UI.

      The simplest fix - I think - would be to modify the internals of MonocleTimer to replace the embedded Timer with a ScheduledThreadPoolExecutor. It would also be nice if there were some way to inject my own Toolkit or Timer.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create any application, run it on an embedded platform, then move the OS clock back ten minutes, then do something that's supposed to provoke a UI update.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      UI should update
      ACTUAL -
      UI doesn't update

      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: