Closed
Bug 462762
Opened 16 years ago
Closed 15 years ago
Broken mail alert
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: omar.bajraszewski, Assigned: Bienvenu)
Details
(Whiteboard: [one case fixed, another still broken - see comment 6])
Attachments
(2 files)
38.39 KB,
image/jpeg
|
Details | |
2.42 KB,
patch
|
standard8
:
review+
standard8
:
superreview+
|
Details | Diff | Splinter Review |
When I check new e-mail I can often see a broken mail alert. I use Gmail IMAP. I can reproduce it also when I delete ImapMail Folder from Profile Folder. Steps to reproduce it: 1)Create a Gmail IMAP account 2)Get new mails or 1)Go to you Profile Folder and delete ImapMail Folder 2)Launch Thunderbird Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081102 Lightning/1.0pre Shredder/3.0b1pre
Updated•16 years ago
|
Whiteboard: DUPEME
Reporter | ||
Comment 1•16 years ago
|
||
I can this error in console: Error: foldersWithNewMail.GetElementAt(0) is null Source File: chrome://messenger/content/newmailalert.js Line: 68
Comment 2•16 years ago
|
||
Don't know why it would happen, but that row is var rootFolder = foldersWithNewMail.GetElementAt(0).QueryInterface(Components.interfaces.nsIWeakReference).QueryReferent(Components.interfaces.nsIMsgFolder); http://mxr.mozilla.org/comm-central/source/mail/base/content/newmailalert.js#68
Comment 3•16 years ago
|
||
Btw, is this a regression? (I haven't seen it on linux.)
Assignee | ||
Comment 4•16 years ago
|
||
Yes, I think it's a regression, but I'm not sure what caused it. I believe that foldersWithNewMail had an element at one point, but by the time the alert is up, that folder has been removed, perhaps because the message was junk, and moved away.
Assignee | ||
Comment 5•16 years ago
|
||
this has been bugging the heck out of me. The problem was that when any server cleared biff, it cleared all the server hits. It should just be removing its root folder from the list of folders with new. What was happening was that one server would get new mail, and notify, but before the dialog got up, the second server would report no new mail, and clear all biffs, ruining everybody's fun!
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
Attachment #349256 -
Flags: superreview?(bugzilla)
Attachment #349256 -
Flags: review?(bugzilla)
I did some investigation on this issue. I think the root cause is in following snippet in RerootFolder() (mail/base/content/commandglue.js) //the new folder being selected should have its biff state get cleared. if(newFolder) { newFolder.biffState = Components.interfaces.nsIMsgFolder.nsMsgBiffState_NoMail; } Setting biffState to "NoMail" triggers nsMessengerWinIntegration::OnItemIntPropertyChanged() to be called with aNewValue = nsIMsgFolder::nsMsgBiffState_NoMail. So mFolderWithNewMail->Clear() get called and mFolderWithNewMail gets cleared. But new mail notification window hasn't poped up yet. When setting up Gmail IMAP account for the fist time, following codes are executed: if (viewType != nsMsgViewType.eShowVirtualFolderResults && (folder.manyHeadersToDownload || showMessagesAfterLoading)) { gRerootOnFolderLoad = true; try { ClearThreadPane(); SetBusyCursor(window, true); folder.startFolderLoading(); folder.updateFolder(msgWindow); } ... } (in ChangeFolder() mail/base/content/commandglue.js). Because msg db hasn't been created yet, fold.manyHeadersToDownload is "true", so the "if" condition holds and gRerootOnFolderLoad is set to "true" Later, in folderListener::OnItemEvent() is triggered with "FolderLoaded" event, and following snippet is executed: if (gRerootOnFolderLoad) { RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType, gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType, gCurrentLoadingFolderSortOrder); } (in mail/base/content/msgMail3PaneWindow.js:210) RerootFolder() sets "NoMail", but new mail notification window hasn't popped up yet. So the race condition occurs. I can re-produce the bug on OpenSolaris and I believe this also exits on Linux. So I think we also need to made a patch for Linux and OpenSolaris. Maybe we can make a similar patch for nsMessengerUnixIntegration.cpp?
Comment 7•16 years ago
|
||
Comment on attachment 349256 [details] [diff] [review] proposed fix I've not tested this, but it looks fine, and I'm assuming you have.
Attachment #349256 -
Flags: superreview?(bugzilla)
Attachment #349256 -
Flags: superreview+
Attachment #349256 -
Flags: review?(bugzilla)
Attachment #349256 -
Flags: review+
(In reply to comment #7) > (From update of attachment 349256 [details] [diff] [review]) > I've not tested this, but it looks fine, and I'm assuming you have. The patch seems only fixing on MS Windows. But how about Unix?
Assignee | ||
Comment 9•16 years ago
|
||
I've checked in this patch, with one small change - we insert new folders at the front of the list, so the most recent server to get hits shows up first... yes, this is windows-only. I don't have linux here.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 10•16 years ago
|
||
Since the bug still exists on Linux, I suggest to re-open the bug and change the platform to "Linux".
Assignee | ||
Comment 11•16 years ago
|
||
I'd much prefer a new bug for linux, thx!
Comment 12•16 years ago
|
||
Ok, I'll file a new bug
Reporter | ||
Comment 13•16 years ago
|
||
Verified with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20081126 Lightning/1.0pre Shredder/3.0b1pre
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 14•16 years ago
|
||
Sorry, but I can still see the broken alert Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20081127 Lightning/1.0pre Shredder/3.0b1pre
Comment 15•16 years ago
|
||
Reopening based on comment 14 (from original reporter).
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Comment 16•16 years ago
|
||
Just for reference, the unix port of attachment 349256 [details] [diff] [review] was bug 466784.
Whiteboard: DUPEME → [one case fixed, another still broken - see comment 6]
Comment 17•15 years ago
|
||
This bug per it's summary is fixed - filed bug 471772 about the remaining issue.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•