Crash Loading a Saved Search Folder [ nsMsgQuickSearchDBView::OnSearchDone]

RESOLVED FIXED in mozilla1.9.1a1

Status

MailNews Core
Backend
P3
critical
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Scott MacGregor, Assigned: Magnus Melin)

Tracking

({crash, verified1.8.1.17})

Trunk
mozilla1.9.1a1
crash, verified1.8.1.17

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
Using today's branch nightly on Windows.

I was running 1.5.0.9 testing something out. Then I went back to Thunderbird 2, clicked on a saved search folder that spans multiple accounts and crashed. Restarting and I still crashed.

Note: this sure does look a lot like Bug 352287

TB29181688

nsMsgQuickSearchDBView::OnSearchDone  [mozilla/mailnews/base/src/nsMsgQuickSearchDBView.cpp, line 270]
nsMsgSearchSession::NotifyListenersDone  [mozilla/mailnews/base/search/src/nsMsgSearchSession.cpp, line 608]
nsMsgSearchSession::TimerCallback  [mozilla/mailnews/base/search/src/nsMsgSearchSession.cpp, line 540]
nsTimerImpl::Fire  [mozilla/xpcom/threads/nsTimerImpl.cpp, line 394]

Comment 1

10 years ago
if your saved search folder spans multiple accounts, why whould we be in nsMsgQuickSearchDBView::OnSearchDone? Were you in a view in the saved search folder?
(Reporter)

Comment 2

10 years ago
Hmm, I could have sworn it used to span multiple folders (not multiple accounts). 

After running in a debug trunk build, I'm able to load the folder again without crashing and verified that it's just searching a single folder.

I think something weird happened when I went back to 1.5 and then back to tb2. The first time I ran none of my virtual folders loaded, then the second time I ran, I got a bunch of saved search folders that I haven't seen in a long time. Then those disappeared after a couple crashes loading that one search.

David, can you try running 1.5 and seeing if you notice anything weird the first time you run tb2 after that?

Comment 3

10 years ago
I run 1.5 quite a bit more than I'd like to :-) and I haven't seen this issue. But I really only have one saved search that I use regularly, which checks all my inboxes and filter targets for new mail. I know I've used that with 1.5, because I notice how slow it is compared to 2.0...

anything special about the folders the saved search searched over? e.g., folder names that needed encoding? or the saved search itself?

Comment 4

10 years ago
Just seen this on TB2.0.0.0 on upgrading from TB1.5.0.12:

http://talkback-public.mozilla.org/search/start.jsp?search=2&type=iid&id=32884310
http://talkback-public.mozilla.org/search/start.jsp?search=2&type=iid&id=32884789

This doesn't happen with a blank profile created in TB2.

Comment 5

10 years ago
To update, I have today installed TB2 on a different machine and, knowing about the problems I had yesterday, started with a blank profile. Same bug manifested itself, unfortunately:

http://talkback-public.mozilla.org/search/start.jsp?search=2&type=iid&id=32912807
http://talkback-public.mozilla.org/search/start.jsp?search=2&type=iid&id=32912828
Ian, have you seen the crash since with newer v2?
Severity: normal → critical
Keywords: crash

Comment 7

9 years ago
I have now started seeing this issue. I used to have a search folder that did a basic search on "From:" and Tags contains. The search itself works fine, and the Search Folder is created. Clicking on the Folder however produces a crash. All other search folders seem to work ok, except for this one. And the name of it doesn't appear to be relevant.

Tom
(Assignee)

Comment 8

9 years ago
Created attachment 329256 [details] [diff] [review]
proposed fix

RefreshCache can fail at least via nsMsgDatabase::GetSearchResultsTable() and by OOM
Assignee: mscott → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #329256 - Flags: superreview?(bienvenu)
Attachment #329256 - Flags: review?(bienvenu)
(Assignee)

Updated

9 years ago
Component: General → MailNews: Backend
OS: Windows XP → All
Priority: -- → P3
Product: Thunderbird → Core
QA Contact: general → backend
Hardware: PC → All
Target Milestone: --- → mozilla1.9.1a1
Version: 2.0 → Trunk

Comment 9

9 years ago
Comment on attachment 329256 [details] [diff] [review]
proposed fix

I think OOM is the only realistic way it can fail, so I don't know that this patch is going to fix the problem. RefreshCache tells GetSearchResultsTable to create the table if it's missing and that generally succeeds, bar OOM. But, we should check for the error.
Attachment #329256 - Flags: superreview?(bienvenu)
Attachment #329256 - Flags: superreview+
Attachment #329256 - Flags: review?(bienvenu)
Attachment #329256 - Flags: review+
(Assignee)

Comment 10

9 years ago
Checking in mailnews/base/src/nsMsgQuickSearchDBView.cpp;
/cvsroot/mozilla/mailnews/base/src/nsMsgQuickSearchDBView.cpp,v  <--  nsMsgQuickSearchDBView.cpp
new revision: 1.37; previous revision: 1.36
done

->FIXED (hopefully, if it still crashes we can open a new bug for that)
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Updated

9 years ago
Duplicate of this bug: 445446
(Assignee)

Comment 12

9 years ago
Created attachment 330627 [details] [diff] [review]
proposed fix (1.8 branch)

Just adding an rv check, should be very safe for branch too.
Attachment #330627 - Flags: approval1.8.1.17?
Product: Core → MailNews Core

Comment 13

9 years ago
Any news on this? When will the fix be in a release version? This bug effectively renders the (great) 'Saved Search Folder' feature unusable for me.

Updated

9 years ago
Attachment #330627 - Flags: approval1.8.1.17? → approval1.8.1.17+
Magnus: stepping on your toes with a checkin-needed, since the branch code freeze is in eight hours.
Keywords: checkin-needed
Whiteboard: [checkin-needed: 1.8 branch]
mailnews/base/src/nsMsgQuickSearchDBView.cpp 1.13.8.12
Keywords: checkin-needed → fixed1.8.1.17
Whiteboard: [checkin-needed: 1.8 branch]
(Assignee)

Comment 16

9 years ago
Thx Phil!
Patrick: this will be in thunderbird 2.0.0.17.

Comment 17

9 years ago
Great news! :)
I can't reproduce this bug cleanly. Can someone verify the fix in the release candidate for TB 2.0.0.17 at ftp://ftp.mozilla.org/pub/thunderbird/nightly/2.0.0.17-candidates/build1/ ?

Comment 19

9 years ago
(In reply to comment #18)
> I can't reproduce this bug cleanly. Can someone verify the fix in the release
> candidate for TB 2.0.0.17 at
> ftp://ftp.mozilla.org/pub/thunderbird/nightly/2.0.0.17-candidates/build1/ ?

It also doesn't happen in 100% of the times I click on a search folder for me. I think when Thunderbird is freshly started, it's more likely to happen.

Just now I did some testing:
TB 2.0.0.16 crashed (verified, multiple times).
TB 2.0.0.17rc (downloaded a few minutes ago, used the same profile): I tried ~30 times, restarted it, restarted the whole system, tried again - no crash. So: seems to work!

Thanks a lot for fixing this! :)
Marking this as verified then. I sounds like the fix worked. :-)
Keywords: fixed1.8.1.17 → verified1.8.1.17
You need to log in before you can comment on or make changes to this bug.