Open
Bug 670551
Opened 13 years ago
Updated 2 years ago
nsIdleService occasionally has spurious "back"/"idle" notifications in the middle a long idle periods
Categories
(Core :: Widget, defect)
Tracking
()
NEW
People
(Reporter: bugzilla-mozilla-20000923, Unassigned)
References
Details
(Keywords: regression, Whiteboard: dupme)
Attachments
(1 file)
4.13 KB,
text/plain
|
Details |
I noticed this problem when I upgraded my XULRunner for ChatZilla to Gecko 2.0 and while idle overnight, every 10 minutes or so, it would mark me "back" and then immediately "away" again. The ChatZilla away/back is directly tied to the nsIIdleService so I logged that and saw the data (idleTime -> timeStr in the code) was just fine - i.e. it has a large idle time even for the "back" notifications! So I've compiled trunk (18c8c2ea4caf07635792b70168fad1d8a6694a38) and attached is a log from nsIdleService.cpp, just after timeStr.AppendInt(idleTime), using the following code: printf("nsIdleService::CheckAwayState: mLHA=%d -> %d, cTime=%d, lTime=%d, iTime=%d (%d)\n", mLastHandledActivity, curTime - idleTime, curTime, lastTime, idleTime, idleTimeMS); I have intermixed it with the notifcations ChatZilla received during the same period to highlight when it goes wrong. As far as I can tell, this problem exists as a result of bug 544240 switching all the important calculations to use seconds instead of milliseconds. It now has rounding issues. :)
Reporter | ||
Comment 1•13 years ago
|
||
In case there's any confusion, I added idleTimeMS myself a little earlier to see how badly it was rounding, like this: PRUint32 idleTimeMS = idleTime; idleTime /= 1000;
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•