Closed
Bug 351464
Opened 18 years ago
Closed 18 years ago
Crash when sorting results in search messages [@ nsMsgDBView::GetCurColumnHandlerFromDBInfo]
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sylvain.pasche, Assigned: nachmore)
References
Details
(4 keywords)
Crash Data
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Open Edit > Find > Search Messages
2. Perform a search so that you have at least one result
3. Try clicking a column header
Then it crashes. I could see this on Windows and Linux
The regression happened between 2006-09-02 and 2006-09-05. Maybe that's coming from bug 348504.
TB22932859W
nsMsgDBView::GetCurColumnHandlerFromDBInfo [mozilla/mailnews/base/src/nsMsgDBView.cpp, line 1599]
nsMsgDBView::Sort [mozilla/mailnews/base/src/nsMsgDBView.cpp, line 3684]
nsMsgSearchDBView::Sort [mozilla/mailnews/base/src/nsMsgSearchDBView.cpp, line 582]
XPTC_InvokeByIndex [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102]
XPCWrappedNative::CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2169]
XPC_WN_CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1449]
js_Invoke [mozilla/js/src/jsinterp.c, line 1353]
js_Interpret [mozilla/js/src/jsinterp.c, line 4052]
js_Invoke [mozilla/js/src/jsinterp.c, line 1372]
nsXPCWrappedJSClass::CallMethod [mozilla/js/src/xpconnect/src/xpcwrappedjsclass.cpp, line 1415]
nsXPCWrappedJS::CallMethod [mozilla/js/src/xpconnect/src/xpcwrappedjs.cpp, line 468]
SharedStub [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp, line 147]
nsEventListenerManager::HandleEventSubType [mozilla/content/events/src/nsEventListenerManager.cpp, line 1655]
nsEventListenerManager::HandleEvent [mozilla/content/events/src/nsEventListenerManager.cpp, line 1762]
nsXULElement::HandleDOMEvent [mozilla/content/xul/content/src/nsXULElement.cpp, line 2229]
nsXULElement::HandleDOMEvent [mozilla/content/xul/content/src/nsXULElement.cpp, line 2208]
nsXULElement::HandleDOMEvent [mozilla/content/xul/content/src/nsXULElement.cpp, line 2208]
PresShell::HandleEventInternal [mozilla/layout/base/nsPresShell.cpp, line 6423]
PresShell::HandleEventWithTarget [mozilla/layout/base/nsPresShell.cpp, line 6321]
Comment 1•18 years ago
|
||
This is most definitely a regression from bug 348504.
Blocks: 348504
Summary: Crash when sorting results in search messages [@ GetCurColumnHandlerFromDBInfo] → Crash when sorting results in search messages [@ nsMsgDBView::GetCurColumnHandlerFromDBInfo]
Assignee | ||
Comment 2•18 years ago
|
||
This should fix it. My mistake - never realised that the search form uses the same interface which means that m_db would be null.
Comment 3•18 years ago
|
||
Comment on attachment 236903 [details] [diff] [review]
Check m_db and dbInfo
Oren,
Would it make sense to do a
if (!(m_db || dbInfo))
return nsnull;
right at the top instead of having 2 clauses?
David's on vacation, I can review this for you.
Assignee | ||
Comment 4•18 years ago
|
||
no - because m_db is used to instansiate dbInfo. If m_db does not exist then I can't pull dbInfo.
Basically: First check that m_db exists
Then try to get dbInfo
Make sure that that exists (second check)
etc...
Thanks!
Comment 5•18 years ago
|
||
I think you should at least move the m_db check to above the dbInfo declartion.
(It really seems like it would be good to XPCOM-ify this method; e.g. make it an NS_IMETHODIMP and return rv, etc.)
Assignee | ||
Comment 6•18 years ago
|
||
- reordered the null checks (as per Adam's comment - #5)
You are right about the ordering - done.
There is an XPCOM method that calls this one. What is the benifit of this one being XPCOMified? It is only ever called internally.
Attachment #236903 -
Attachment is obsolete: true
Comment 7•18 years ago
|
||
Comment on attachment 236917 [details] [diff] [review]
Reordered null checks
this will do for now - thx for the patch; I'll land it on the trunk and branch.
Attachment #236917 -
Flags: superreview+
Comment 8•18 years ago
|
||
yeah, we don't want to xpcomify this function - it's an internal method. More error checking is a good idea, however, and we shouldn't be calling this method at all unless we're doing a byCustom sort...
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 10•18 years ago
|
||
verified on the 1.8 branch using the Thunderbird 2 candidate build, version 2.0.0.0 (20070326). I verified using the reporter's STR. Adding verified keyword for the branch.
Keywords: verified1.8.1.3
Updated•14 years ago
|
Crash Signature: [@ nsMsgDBView::GetCurColumnHandlerFromDBInfo]
You need to log in
before you can comment on or make changes to this bug.
Description
•