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
1 crash per month for 3.1 ending at 3.1.10. And none for v5 or v6.
Created attachment 619491 [details] [diff] [review] add check for existance of scope->m_adapter 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)
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.
Created attachment 619737 [details] [diff] [review] made change suggested in comment 4 Changed patch to use NS_IF_ADDREF. Also moved the *aSearchAdapter = nsnull; line to ensure that *aSearchAdapter is assigned a value in all cases.
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.
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...
Thanks for the patch! http://hg.mozilla.org/comm-central/rev/cd7bbb603424