Last Comment Bug 523343 - [faceted search] results list crash [@ nsMsgDBView::MarkThreadRead(nsIMsgThread*, unsigned int, nsTArray<unsigned int>&, int)]
: [faceted search] results list crash [@ nsMsgDBView::MarkThreadRead(nsIMsgThre...
[no l10n impact]
: crash, fixed-seamonkey2.0.1
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: 1.9.1 Branch
: x86 All
-- critical (vote)
: Thunderbird 3.0rc1
Assigned To: David :Bienvenu
Depends on:
  Show dependency treegraph
Reported: 2009-10-20 06:24 PDT by Wayne Mery (:wsmwk, NI for questions)
Modified: 2011-06-13 10:01 PDT (History)
3 users (show)
mozilla: blocking‑thunderbird3+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

proposed fix (6.08 KB, patch)
2009-10-20 14:45 PDT, David :Bienvenu
standard8: review+
standard8: superreview+
Details | Diff | Splinter Review

Description User image Wayne Mery (:wsmwk, NI for questions) 2009-10-20 06:24:36 PDT
[faceted search] results list crash [@ nsMsgDBView::MarkThreadRead(nsIMsgThread*, unsigned int, nsTArray<unsigned int>&, int)]
3.0b4 top 20 crash, but not comment in nightlies. doesn't appear to go back far - the earliest I find is 20090627031459 build. Several mentioned doing "r" reply while in results list. marking blocking? because of it's potential to become topcrash with more search results usage. 

xref  Bug 522327 -  crash clicking Go Back in search results [@ nsMsgDBView::NavigateFromPos(int, unsigned int, unsigned int*, unsigned int*, unsigned int*, int)]

More variety of crash comments...
* in search results as list, trying to mark a bunch of items as read. This was using an imap account.
* I was highlighting in the body of a message and attempted to type. The message was only available for viewing, not editing.
* I changed the listing in the search view to "list" and then selected all messages. Then, I hit the 'm' key to mark them all read and boom goes the email client.
* double clicking on it from the results.

most of the crashes (but not this one) are 0x0
thunderbird-bin	nsMsgDBView::MarkThreadRead	mailnews/base/src/nsMsgDBView.cpp:5909
1	thunderbird-bin	nsMsgDBView::MarkThreadOfMsgRead	mailnews/base/src/nsMsgDBView.cpp:5885
2	thunderbird-bin	nsMsgDBView::SetThreadOfMsgReadByIndex	mailnews/base/src/nsMsgDBView.cpp:3067
3	thunderbird-bin	nsMsgDBView::ApplyCommandToIndices	mailnews/base/src/nsMsgDBView.cpp:2745
4	thunderbird-bin	nsMsgSearchDBView::DoCommand	mailnews/base/src/nsMsgSearchDBView.cpp:816
5	libxpcom_core.dylib	NS_InvokeByIndex_P	xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp:179
6	thunderbird-bin	XPCWrappedNative::CallMethod	js/src/xpconnect/src/xpcwrappednative.cpp:2454
7	thunderbird-bin	XPC_WN_CallMethod	js/src/xpconnect/src/xpcwrappednativejsops.cpp:1590
Comment 1 User image David :Bienvenu 2009-10-20 09:16:20 PDT
taking, easy to reproduce
Comment 2 User image David :Bienvenu 2009-10-20 14:45:59 PDT
Created attachment 407396 [details] [diff] [review]
proposed fix

This makes us get the db from the msg hdr, instead of assuming the view has it. I found a few other places that were doing this and made them use a utility routine. I also looked for other commands that might have this same issue and didn't find any.

This should probably be added to some test case somewhere - I'll try to find an appropriate one...
Comment 3 User image David :Bienvenu 2009-10-24 07:07:53 PDT
fix on trunk and branch (I got the comment somewhat wrong in the trunk checkin, but with the right bug #)
Comment 4 User image Wayne Mery (:wsmwk, NI for questions) 2010-01-01 12:00:41 PST
v.fixed per crash stats, only crashes appearing are 3.0b4

Note You need to log in before you can comment on or make changes to this bug.