Launchpad has imported 16 comments from the remote bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=757762.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2012-05-23T07:46:23+00:00 Mozilla-weilbacher wrote:

I am using Lightning 1.4 with Mozilla/5.0 (X11; Linux x86_64; rv:12.0)
Gecko/20120429 Firefox/12.0 SeaMonkey/2.9.1.

Since one of the latest Lightning updates (I think it was 1.3) I noticed
that alarm popups very often appear to late. With Lightning 1.4 the new
"now" indicator (the red bar) was new, so now I see why the alarms
appeared too late: the time that Lightning keeps internally often lags
behind the real time.

A specialty of my setup may be that I am using it on a Laptop that I
frequently suspend. After waking up I see that the software clock of the
system is correct while it takes Lightning at least a few minutes
(sometimes half an hour) to notice that it was wrong. Just now I woke
the laptop up in the morning, the system time clock showed 09:22:32 (Wed
23 May 2012) but Lightning's red line was at ~22:45 on Wed 23 May.

While I am typing this, I set up a test event at 09:42 with an alarm 0
minutes before. It is now 09:46:00 and the alarm still hasn't shown up
and the red indicator is still a bit above the alarm.

This is unacceptable.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/0

------------------------------------------------------------------------
On 2012-05-23T08:00:59+00:00 Mozilla-weilbacher wrote:

The alarm that should have appeared at 09:42 finally showed up at about
09:54:30. It took until about 10:00:00 to visually see that red "now"
indicator move up across the 09:42 event. (The laptop didn't suspend
again in between.)

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/1

------------------------------------------------------------------------
On 2012-05-23T10:23:52+00:00 Philipp-bugzilla wrote:

We don't keep an internal time, but the red bar only updates every 15
minutes to avoid too much useless system load. Check out the pref
calendar.view.timeIndicatorInterval and set it to 1 if you really need
updates every minute.

The alarms issue could happen due to a different set of timers. When the
calendar refreshes, timers are created for events within the next hour
or so. Although we pass flags to get a precise timer, maybe its not
working.

Did you suspend between the refresh and the alarm firing? Could you test
without suspending inbeween to see if it makes a difference?

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/2

------------------------------------------------------------------------
On 2012-05-23T14:10:25+00:00 Mozilla-weilbacher wrote:

No, there was no suspend between the 09:42 alarm setup and its final
firing 12.5 minutes later (as I wrote in comment 1, but maybe I
misunderstand the question?).

Where do I have to look to see the active timers? I'm totally outdated
regarding ways to debug calendar code, but I would give it a try...

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/3

------------------------------------------------------------------------
On 2012-05-23T14:56:30+00:00 Matthew-mecca wrote:

Are the late alarms reproducible if the laptop is not suspended at all
after restarting Thunderbird?

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/4

------------------------------------------------------------------------
On 2012-05-23T17:01:39+00:00 Mozilla-weilbacher wrote:

I had to restart SeaMonkey (not Thunderbird) but for the moment the
problem seems to have stopped.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/5

------------------------------------------------------------------------
On 2012-05-24T08:55:02+00:00 Mozilla-weilbacher wrote:

OK, after some more tests I can confirm that suspending the laptop for a
longer time (like several hours over night) without restarting SM
afterwards causes the problem with the delayed alarms. Once I do restart
the program, the problem is gone. Suspending for a short time (e.g. 45
minutes) doesn't seem to cause any problems.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/6

------------------------------------------------------------------------
On 2012-05-25T00:59:20+00:00 Philipp-bugzilla wrote:

Hmm strange, we usually restart the alarm service on wakeup, which
should set the timers again. I don't really know how to further debug
this aside from adding some debug info, would you be comfortable
modifying the files in the .xpi?

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/7

------------------------------------------------------------------------
On 2012-05-25T07:17:19+00:00 Mozilla-weilbacher wrote:

Sure, I can modify files.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/8

------------------------------------------------------------------------
On 2012-05-25T07:40:50+00:00 Philipp-bugzilla wrote:

* In calendar-js/calAlarmService.js
  - add cal.ERROR("AS STARTUP") inside the startup() function.
  - add cal.ERROR("AS SHUTDOWN") inside the shutdown() function.
  - add cal.ERROR("AS UPDATE") inside the contained notify function
  - add cal.ERROR("ADD TIMER" + aItem.title + " in " + aTimeout + " for " +  
    cal.alarms.calculateAlarmDate(aItem, aAlarm)); inside the addTimer function
  - add cal.ERROR("FIRE TIMER " + cal.now() + " vs " +
    cal.alarms.calculateAlarmDate(aItem, aAlarm)) inside the notify functio,
    contained in addTimer.
  - add cal.ERROR("REMOVE TIMER " + aItem.title + " alarm " +
    aAlarm.toString(aItem)); inside the removeTimer functon
  - add cal.ERROR("WAKEUP: " + aTopic) inside the first if block of the observe
    function.

That should give you enough debugging to help us see where its going
wrong

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/9

------------------------------------------------------------------------
On 2012-05-25T16:08:17+00:00 Mozilla-weilbacher wrote:

I added all that, restarted SeaMonkey and then suspended the laptop
several times (but only briefly). The WAKEUP message never appeared. It
only enters the observe function (of course with aTopic ==
"xpcom_shutdown") when I quit SeaMonkey.

I looked for documentation of "wake_notification" but didn't find
anything. Bug 438040 comment 0 suggests that it doesn't work on Linux,
although that comment is from 2008. That would also not explain why I
never saw this problem until recently.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/10

------------------------------------------------------------------------
On 2012-05-25T16:55:54+00:00 Philipp-bugzilla wrote:

Hmm indeed this search <http://mxr.mozilla.org/comm-
central/search?string=wake_notification> suggests that there is no
support aside from mac and windows. Very unfortunate.

If timers are not reliable over a sleep cycle, thats probably a core
bug. We try to reinitialize them using the wake notification, but it
seems we are out of luck on Linux...

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/11

------------------------------------------------------------------------
On 2012-05-25T17:46:55+00:00 Matthew-mecca wrote:

As a hack, we could track the current time in the alarm service, and run
a consistency check every minute to check if current time > expected
time, and reload alarms if so.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/12

------------------------------------------------------------------------
On 2012-05-26T01:43:34+00:00 Philipp-bugzilla wrote:

Sounds like a plan. I'm not sure if the skew will be large enough to
detect for a timer that runs every minute though.

Maybe just set a timer that should fire every 10-15 minutes, save the
expected time of firing with it, then when it fires compare the two. We
should tinker with the interval to find out.

If someone knows linux API to detect when the systen wakes, we could
also try patching core.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/13

------------------------------------------------------------------------
On 2012-05-26T06:12:33+00:00 Philipp-bugzilla wrote:

I have a possible patch for core that makes linux emit
wake_notification. I don't know if it works yet and I don't know if it
will be accepted since it uses functions from kernel headers not usually
copied to /usr/include/linux.

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/14

------------------------------------------------------------------------
On 2012-05-26T06:14:12+00:00 Philipp-bugzilla wrote:

*** Bug 680778 has been marked as a duplicate of this bug. ***

Reply at: https://bugs.launchpad.net/ubuntu/+source/lightning-
extension/+bug/1052800/comments/15


** Changed in: lightning-extension
       Status: Unknown => Confirmed

** Changed in: lightning-extension
   Importance: Unknown => Critical

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1052800

Title:
  Lightning doesn't show reminder alert on time when the computer
  suspended

To manage notifications about this bug go to:
https://bugs.launchpad.net/lightning-extension/+bug/1052800/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to