Closed Bug 609758 Opened 14 years ago Closed 12 years ago

crash [@ nsMsgSearchSession::GetRunningAdapter(nsIMsgSearchAdapter**)]

Categories

(MailNews Core :: Search, defect)

x86
All
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 15.0

People

(Reporter: wsmwk, Assigned: dlech)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

crash [@ nsMsgSearchSession::GetRunningAdapter(nsIMsgSearchAdapter**)]
almost non-existent
interesting: all OS

2b548a85-9e82-46fc-a22d-7b91c2101007 (thomas)
0	thunderbird-bin	nsMsgSearchSession::GetRunningAdapter	mailnews/base/search/src/nsMsgSearchSession.cpp:566
1	thunderbird-bin	nsMsgSearchSession::OnStopRunningUrl	mailnews/base/search/src/nsMsgSearchSession.cpp:374
2	thunderbird-bin	nsMsgMailNewsUrl::SetUrlState	mailnews/base/util/nsMsgMailNewsUrl.cpp:135
3	thunderbird-bin	nsImapMailFolder::SetUrlState	mailnews/imap/src/nsImapMailFolder.cpp:6603
4	libxpcom_core.so	libxpcom_core.so@0x63f86	
5	libxpcom_core.so	nsProxyObjectCallInfo::Run	xpcom/proxy/src/nsProxyEvent.cpp:181
6	libxpcom_core.so	nsThread::ProcessNextEvent	xpcom/threads/nsThread.cpp:521 


bp-a812ff1a-b0de-4cc5-ba2e-ad52d2100901 v3.1.2
0	thunderbird.exe	nsMsgSearchSession::GetRunningAdapter	mailnews/base/search/src/nsMsgSearchSession.cpp:584
1	thunderbird.exe	nsImapMailFolder::NotifySearchHit	mailnews/imap/src/nsImapMailFolder.cpp:5574
2	xpcom_core.dll	NS_InvokeByIndex_P	xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:102 


bp-f34641cc-9c0d-4563-b4b0-ca93c2101104 v3.1.7pre
0	thunderbird.exe	nsMsgSearchSession::GetRunningAdapter	mailnews/base/search/src/nsMsgSearchSession.cpp:584
1	thunderbird.exe	nsMsgSearchSession::OnStopRunningUrl	mailnews/base/search/src/nsMsgSearchSession.cpp:392
2	thunderbird.exe	nsMsgMailNewsUrl::SetUrlState	mailnews/base/util/nsMsgMailNewsUrl.cpp:136
3	thunderbird.exe	nsImapMailFolder::SetUrlState	mailnews/imap/src/nsImapMailFolder.cpp:6643
4	xpcom_core.dll	NS_InvokeByIndex_P	xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:102
Crash Signature: [@ nsMsgSearchSession::GetRunningAdapter(nsIMsgSearchAdapter**)]
1 crash per month for 3.1 ending at 3.1.10. 
And none for v5 or v6.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
I caused a crash here while working on an extension. This particular case involved an IMAP server. It is possible to create a search without an adapter, which I did. The adapter is not created until you run the search. Then, I manually sent a search command to the server using the nsIMsgImapMailFolder.issueCommandOnMsgs function.

The crash was caused by scope->m_adapter being a null pointer. I added a check for this so that when it happens, it fails gracefully instead of crashing.
David, can you request review for your patch?

(fwiw, no crashes found for past 6 weeks. but reopening to accept patch)
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Attachment #619491 - Flags: review?
Attachment #619491 - Flags: review? → review?(dbienvenu)
Comment on attachment 619491 [details] [diff] [review]
add check for existance of scope->m_adapter

thx for the patch. You should be able to use NS_IF_ADDREF(*aSearchAdapter = scope->m_adapter); If that works, I'd give an r+ for that.
Attachment #619491 - Flags: review?(dbienvenu) → review-
Changed patch to use NS_IF_ADDREF. Also moved the *aSearchAdapter = nsnull; line to ensure that *aSearchAdapter is assigned a value in all cases.
Attachment #619491 - Attachment is obsolete: true
Attachment #619737 - Flags: review?(dbienvenu)
Forgot to mention that I tested it with my broken plugin to verify that the revised patch also fixes the crash.
Comment on attachment 619737 [details] [diff] [review]
made change suggested in comment 4

looks ok, thx.
Attachment #619737 - Flags: review?(dbienvenu) → review+
Attachment #619737 - Flags: superreview?(mbanner)
Comment on attachment 619737 [details] [diff] [review]
made change suggested in comment 4

you don't need super review for a patch that doesn't change an interface...
Attachment #619737 - Flags: superreview?(mbanner)
Keywords: checkin-needed
Thanks for the patch!

http://hg.mozilla.org/comm-central/rev/cd7bbb603424
Assignee: nobody → gismho+mozbug
Status: REOPENED → RESOLVED
Closed: 13 years ago12 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: