Open
Bug 410706
Opened 17 years ago
Updated 3 years ago
setTimeout and setInterval stops repeating after system time date or clock changed
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
NEW
People
(Reporter: info, Unassigned)
References
()
Details
Attachments
(1 file)
|
1.37 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
We have to timers there reflecting time in two different ways. If I change the system time, they will stop working. The function called by a setInterval statement just stops being called afterwards
Reproducible: Always
Steps to Reproduce:
1.Open the link
2.Change system time
Actual Results:
The timers stopped (setInterval sopped working)
Expected Results:
I was expecting the timers to keep running on every setInterval function call.
Comment 1•17 years ago
|
||
No crash involved though, right? "crash" means abnormal/abrupt termination of the Firefox process.
/be
Assignee: general → nobody
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM: Level 0
Ever confirmed: true
QA Contact: general → general
Summary: setInterval crashes and stops after system time changed → setInterval stops repeating after system time changed
Comment 2•17 years ago
|
||
Matias, can you remove the console.log call? It is undefined in Minefield.
Comment 3•17 years ago
|
||
Note for the fix: make sure the invisible "lateness" argument provided to the called function is the correct value, too.
Comment 4•17 years ago
|
||
(In reply to comment #0)
> If I change the system time, they will stop working.
> The function called by a setInterval statement just stops being called afterwards
Phenomenon depends on "change of system time" (far future or far ancient) and software's (Firefox in your case) implementation which relates to timer (setInterval/setTimeout when user coded JavaScript).
"From what date/time to what date/time" did you change system-time?
What is your "setInterval" value?
| Reporter | ||
Comment 5•17 years ago
|
||
(In reply to comment #1)
> No crash involved though, right? "crash" means abnormal/abrupt termination of
> the Firefox process.
>
> /be
>
Correct, no crash involoved. just setInterval stops working
| Reporter | ||
Comment 6•17 years ago
|
||
(In reply to comment #4)
> (In reply to comment #0)
> > If I change the system time, they will stop working.
> > The function called by a setInterval statement just stops being called afterwards
>
> Phenomenon depends on "change of system time" (far future or far ancient) and
> software's (Firefox in your case) implementation which relates to timer
> (setInterval/setTimeout when user coded JavaScript).
> "From what date/time to what date/time" did you change system-time?
> What is your "setInterval" value?
>
Any time change on windows XP will cause the setInterval to stop, when clicking on "Apply" or "Ok" button. I tested it by changing seconds (+- 30 sec) and hours (+- 1 hour)
Comment 7•17 years ago
|
||
on linux, if i set the time to the past the timers will appear to stop for the period of the adjustment. setting the time into the future does not cause any stoppage.
Comment 8•17 years ago
|
||
ditto on windows. invalid?
| Reporter | ||
Comment 9•17 years ago
|
||
(In reply to comment #2)
> Matias, can you remove the console.log call? It is undefined in Minefield.
>
See if it works now, console is an object which belongs to firebug extension. I put it on a conditional, it should be called if console doesn't exist. But it's usefull to notice when the function is called (or not)
Comment 10•17 years ago
|
||
(In reply to comment #9)
yes, that is essentially the same modification I made. The timer works now in Firefox without the extension.
Comment 11•17 years ago
|
||
(In reply to comment #8)
> ditto on windows. invalid?
>
The timer stops when I set the time to one hour in the past. The same thing happens with setTimeout().
Aren't setInterval/setTimeout supposed to fire after a delay (in milliseconds) and not at a fixed currentDate+delay? Even if that was the case, there's a bug here because of the inconsistent behavior when changing the system time to the past or to the future.
IE7 & Opera 9.5 do not seem to have this problem.
Comment 12•16 years ago
|
||
I've got the exact same problem. I'm also pretty certain that this wasn't happening in the past (but I can't say I know exactly which version).
"Aren't setInterval/setTimeout supposed to fire after a delay (in milliseconds)
and not at a fixed currentDate+delay? Even if that was the case, there's a bug
here because of the inconsistent behavior when changing the system time to the
past or to the future." - YES!
I think that what's happened here is that someone has changed either (1) the way that these two functions measure time to be based on the new Date() function or (2) they're always used the new Date() function, but the code that handles possible client changes to the past has been removed.
I will try to fix this and report back.
Updated•14 years ago
|
Summary: setInterval stops repeating after system time changed → setTimeout and setInterval stops repeating after system time date or clock changed
Comment 15•14 years ago
|
||
Has been fixed in 4.0b11?
Comment 16•8 years ago
|
||
Has this been fixed in 53b?
(I'm sorry, I couldn't resist)
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Flags: needinfo?(overholt)
Priority: P3 → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•