Closed Bug 383584 Opened 17 years ago Closed 15 years ago

crashed while getting message (after rename a virtual folder) [@ VirtualFolderChangeListener::OnHdrAdded(nsIMsgDBHdr*, unsigned int, int, nsIDBChangeListener*)]

Categories

(MailNews Core :: Filters, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: fishywang, Assigned: Bienvenu)

Details

(Keywords: crash, topcrash, Whiteboard: [check crash-stats after 3.0b4])

Crash Data

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: version 2.0.0.0 (20070326)

Thunderbird crashed while retrieving new message match a search criteria of a renamed virtual folder., after restart Thundebird, the newest message will got 2 copies in the inbox.
crash report will be posted later.

Reproducible: Always

Steps to Reproduce:
1.Create a virtual folder
2.Rename this virtual folder
3.Send a mail to yourself that match the search criteria of the virtual folder
4.Get message for that account
Actual Results:  
Thunderbird crashed
After restart, there will be 2 copies of that message.

Expected Results:  
Thunderbird works ok and the message won't be duplicated.
Attached file crash report 1
Attached file crash report 2
still see this problem with version 2.0.0.9?
if no please close bug
if yes, post talkback id.  
on trunk with same stack bp-6ae29d59-e4a4-11dc-bb85-001a4bd43ef6 (SM windows - the only one on crash-stats).

perhaps related to bug 340652, which is reported against v1.5. (slightly different stack - but top 3 frames are same)
Status: UNCONFIRMED → NEW
Component: General → MailNews: Filters
Ever confirmed: true
Keywords: crash
OS: Mac OS X → All
Product: Thunderbird → Core
QA Contact: general → filters
Hardware: PC → All
Summary: crashed while getting message (after rename a virtual folder) → crashed while getting message (after rename a virtual folder) [@ VirtualFolderChangeListener::OnHdrAdded]
I can't get Talkback Agent enabled on Mac (I found the app and run it and enabled it, but it just didn't collect information after crash), but I DO can reproduce it on 2.0.14, following the steps.
Product: Core → MailNews Core
(In reply to comment #6)
> bienvenu, anything land last week that you think may have fixed this?  Last
> trunk crash is 20090603 build. Only think you landed on 6/3 is bug 414723

that turned out to be incorrect - still a topcrash on trunk(#15), but not a topcrash for 3.0b2 (#89). not sure why the disparity. So for that reason, not requesting blocking.
example bp-cd2b1e22-4d92-457e-b111-4bd272090708
Flags: wanted-thunderbird3?
Summary: crashed while getting message (after rename a virtual folder) [@ VirtualFolderChangeListener::OnHdrAdded] → crashed while getting message (after rename a virtual folder) [@ VirtualFolderChangeListener::OnHdrAdded(nsIMsgDBHdr*, unsigned int, int, nsIDBChangeListener*)]
Version: unspecified → Trunk
The crash is here: http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgAccountManager.cpp#2561 on 
m_searchSession->AddScopeTerm(nsMsgSearchScope::offlineMail, m_folderWatching);

On http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgAccountManager.cpp#2417 we have

if (NS_SUCCEEDED(rv) && msgDB)
The crash is here: http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgAccountManager.cpp#2561 on 
m_searchSession->AddScopeTerm(nsMsgSearchScope::offlineMail, m_folderWatching);

On http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgAccountManager.cpp#2417 we have

if (NS_SUCCEEDED(rv) && msgDB)
  ...
  // set up m_searchSession
  ...
return rv;...

So m_searchSession could be null if that happens. Maybe that should return some error code if !msgDB?
taking - I can reproduce this...
Status: NEW → ASSIGNED
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b4
https://bugzilla.mozilla.org/show_bug.cgi?id=490326#c18 - the crash described there is this crash. Patch upcoming.
Keywords: topcrash
Attached patch proposed fixSplinter Review
There are a couple fixes in this patch.

The first is that if we fail to initialize the virtualFolderChangeListener, we shouldn't add it as a listener. This can happen if the vf db is missing. For good measure, I also null check the m_searchSession.

The second fix is when loading saved searches, and the db is missing, we were corrupting the previous saved search with properties from the saved search with the missing db. Nulling out the db folder info when we parse a uri term line fixes that.
Assignee: nobody → bienvenu
Attachment #391483 - Flags: superreview?(bugzilla)
Attachment #391483 - Flags: review?(bugzilla)
Flags: wanted-thunderbird3?
Attachment #391483 - Flags: superreview?(bugzilla)
Attachment #391483 - Flags: superreview+
Attachment #391483 - Flags: review?(bugzilla)
Attachment #391483 - Flags: review+
Comment on attachment 391483 [details] [diff] [review]
proposed fix

I couldn't reproduce the crash, but this looks good anyway.
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
as of today this is #12 crasher for 3.0b3 and the last crash is build
20090715142648 (3.0b3). however, crashes in nightlies were so rare that I don't think we'll know this is totally gone until we can check 3.0b4 

TB20022 - this is #100 in topcrash list, so doubt it will rate pushing to v2.
Whiteboard: [check crash-stats after 3.0b4]
Crash Signature: [@ VirtualFolderChangeListener::OnHdrAdded(nsIMsgDBHdr*, unsigned int, int, nsIDBChangeListener*)]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: