Closed Bug 492571 Opened 15 years ago Closed 15 years ago

crash [@ nsMsgDBView::GetInsertIndexHelper(nsIMsgDBHdr*, nsTArray<unsigned int>&, nsCOMArray<nsIMsgFolder>*, int, int)]

Categories

(MailNews Core :: Backend, defect)

x86
All
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: wsmwk, Assigned: Bienvenu)

Details

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

Crash Data

Attachments

(1 file)

crash [@ nsMsgDBView::GetInsertIndexHelper]

top 20 crash of 3.0b3pre. in current TB2, and every TB3 beta release. no useful comments. 

TB54283877 - comment = nothing particular

bp-23aef3c6-f8b6-4ee8-8c68-9eca82090509
Frame	Module	Signature [Expand]	Source
0	thunderbird.exe	nsMsgDBView::GetInsertIndexHelper	mailnews/base/src/nsMsgDBView.cpp:4706
1	thunderbird.exe	nsMsgQuickSearchDBView::SortThreads	mailnews/base/src/nsMsgQuickSearchDBView.cpp:490
2	thunderbird.exe	nsMsgThreadedDBView::Sort	mailnews/base/src/nsMsgThreadedDBView.cpp:361
3	thunderbird.exe	nsMsgThreadedDBView::InitSort	mailnews/base/src/nsMsgThreadedDBView.cpp:583
4	thunderbird.exe	nsMsgThreadedDBView::InitThreadedView	mailnews/base/src/nsMsgThreadedDBView.cpp:162
5	thunderbird.exe	nsMsgQuickSearchDBView::Open	mailnews/base/src/nsMsgQuickSearchDBView.cpp:74
6	xpcom_core.dll	NS_InvokeByIndex_P	xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:101
7	thunderbird.exe	XPCWrappedNative::CallMethod	js/src/xpconnect/src/xpcwrappednative.cpp:2450
Flags: blocking-thunderbird3?
I'm not sure if it's the same bug but I can reproduce it very often.
http://crash-stats.mozilla.com/report/index/b0a4d26f-d7cd-4ba3-9abf-75ce92090501

It's somehow realted to bug 414723.Steps to reproduce the crash:
1)Subscribe to IMAP (i.e. Gmail) and switch to All Folders mode
2)Receive duplicated messages
3)Read messages and delete them. You can still see in folder list that there are unread messages in this folder
4)To see them I have to switch to smart folders and then click Gmail folder and Inbox folder. In that moment Thunderbird crashes
We should try and fix this, pushing in David's direction initially.
Assignee: nobody → bienvenu
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b4
are you using a view that's not all messages? QuickSearchDBView is only used if you're using a non-default view, doing a quick search, or using a saved search over a single folder.
(In reply to comment #3)
> are you using a view that's not all messages? QuickSearchDBView is only used if
> you're using a non-default view, doing a quick search, or using a saved search
> over a single folder.
Well, I use default view. But recently I haven't reproduced the crash.
#31 for 3.0b3

but isn't in top 100 of TB 2.0.0.22 - eg. TB55091887 opening a large folder
and stack isnt' exactly the same as trunk's
nsMsgDBView::GetInsertIndexHelper  [mozilla/mailnews/base/src/nsMsgDBView.cpp, line 4309]
nsMsgQuickSearchDBView::SortThreads  [mozilla/mailnews/base/src/nsMsgQuickSearchDBView.cpp, line 431]
nsMsgThreadedDBView::Sort  [mozilla/mailnews/base/src/nsMsgThreadedDBView.cpp, line 351]
nsMsgQuickSearchDBView::OnSearchDone  [mozilla/mailnews/base/src/nsMsgQuickSearchDBView.cpp, line 283]
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]
nsAppStartup::Run  [mozilla/toolkit/components/startup/src/nsAppStartup.cpp, line 152]
main  [mozilla/mail/app/nsMailApp.cpp, line 62]
Summary: crash [@ nsMsgDBView::GetInsertIndexHelper] → crash [@ nsMsgDBView::GetInsertIndexHelper(nsIMsgDBHdr*, nsTArray<unsigned int>&, nsCOMArray<nsIMsgFolder>*, int, int)]
Trunk line numbers are off...
Attached patch possible fixSplinter Review
If I'm reading the beta 3 crash correctly, we're crashing because the db is null, so protect against that, and tell the caller to stick the header at the end of the view, instead of crashing.
Attachment #391427 - Flags: superreview?(bugzilla)
Attachment #391427 - Flags: review?(bugzilla)
Comment on attachment 391427 [details] [diff] [review]
possible fix

This looks like the right idea. I think sticking it at the end is the best we can do.
Attachment #391427 - Flags: superreview?(bugzilla)
Attachment #391427 - Flags: superreview+
Attachment #391427 - Flags: review?(bugzilla)
Attachment #391427 - Flags: review+
fix checked in. We'll need to check crash-stats in a week or so and see if this crash has gone away from nightly builds.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Crash Signature: [@ nsMsgDBView::GetInsertIndexHelper(nsIMsgDBHdr*, nsTArray<unsigned int>&, nsCOMArray<nsIMsgFolder>*, int, int)]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: