Closed Bug 343246 Opened 18 years ago Closed 18 years ago

Quickly fired alarms don't always appear in the same window

Categories

(Calendar :: Internal Components, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ogirtd, Assigned: jminta)

References

Details

(Whiteboard: [swag:.5d])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060629 Sunbird/0.3a2+

When opening Sunbird with more than one event missed, instead of one popup with a list of all the missed events (with checkboxes for removing alarm for next time), Sunbird opens many popup windows.

Reproducible: Always
I've seen this before in testing.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking0.3+
Summary: Add more alarms options → Quickly fired alarms don't always appear in the same window
*** Bug 341571 has been marked as a duplicate of this bug. ***
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody
Whiteboard: [swag:.5d]
(In reply to comment #2)
> *** Bug 341571 has been marked as a duplicate of this bug. ***
> 

Confirmed in 2006-08-01/Win32 Nightly.

Open Sunbird and loaded a remote calendar with several recurring events.
25 Sunbird windows are present in Windows XP taskbar - 1 Sunbird proper, and 24 alarm windows.  None of which respond until program is killed, even after waiting 30 minutes.

Just had to kill and restart sunbird (without loading remote calendar) to obtain version string:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060801 Calendar/0.3a2+


Forgot to also state:

I get the "Unresponsive Script" dialogue for each event if I click "stop script" for each of them.  If I check the "Never show this dialog again" box and click "continue", that's when it freezes up indefinitely.

(In reply to comment #5)
That is Bug 346801 and not related to the issue in this bug. 

Don't resent, but please don't add useless 'the-problem-still-exists' comments like Comment #4 if the bug is already confirmed but not yet fixed. [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html]
Assigning to jminta at his request via irc
Assignee: nobody → jminta
This patch is pretty well described by the comment included in the code.  There's a small time-frame after we call openWindow() but before the window will be returned by getMostRecentWindow().  If an alarm is fired in this time-frame, it will end up in a second window, which is bad.  This patch lets us keep track of windows that are being opened.
Attachment #232652 - Flags: second-review?(dmose)
Attachment #232652 - Flags: first-review?(mattwillis)
Comment on attachment 232652 [details] [diff] [review]
store opening window

+    // This is a work-around for the fact that there is a delay between when
+    // we call openWindow and when it appears via getMostRecentWindow.  If an
+    // alarm is fired in that window, it will actually end up in another window. 

Unless I'm misinterpreting the above comment, you probably want to reword "If an alarm is fired in that window" somehow, so as to not confuse "window of time" with "alarm windows". If I'm interpreting it wrong, then you _really_ need to reword things to make it clearer. :)


         else {
+            // The window isn't open yet
+            var alarmObserver = this;
             var addAlarm = function() {
-                gAlarmWindow.addAlarm( event );
+                openAlarmWindow.addAlarm( event );
+                // Now the window is open
+                alarmObserver._WindowOpening = null;

What purpose does the "alarmObserver" variable serve here?  Could the last line not be "this._WindowOpening = null;"?


The comments apply to both files :)

r=lilmatt with those nits
Attachment #232652 - Flags: first-review?(mattwillis) → first-review+
Comment on attachment 232652 [details] [diff] [review]
store opening window

r=dmose
Attachment #232652 - Flags: second-review?(dmose) → second-review+
Patch checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060823 Calendar/0.3a2+
-> VERIFIED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: