Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
x86
-
linux
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.
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
- relates to
-
JDK-4290274 (timer) java.util.Timer.scheduleAtFixedRate() fails if the system time is changed
- Open
-
JDK-8248381 Create a daemon thread for MonocleTimer
- Resolved