AssertionError in ScheduledService.executeTask

Sebastian Stenzel sebastian.stenzel at
Mon Feb 17 18:42:57 UTC 2020

When restart()ing a ScheduledService while having assertions enabled, the assertions in [1] or [2] fail. Without assertions the code seems to run fine, though.

According to the inline comments, "resetting things should have cleared the delayTask". Therefore I wonder, if resetting the delayTask is missing in reset().

At the moment this field is only set to null during cancel() [3] as well as after exception-free execution of a previous TimerTask [4].

A workaround would be to call cancel() first, but one has to make sure to be in a valid state. I wonder if there is some documentation about the state transitions and how to start, stop and restart a service correctly.

[1]: <>
[2]: <>
[3]: <>
[4]: <>

More information about the openjfx-dev mailing list