Closed Bug 66958 Opened 24 years ago Closed 24 years ago

Search messages: Crash when initiating search

Categories

(SeaMonkey :: MailNews: Message Display, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.8

People

(Reporter: laurel, Assigned: mozilla)

Details

(Keywords: crash, Whiteboard: [nsbeta1+])

Attachments

(3 files)

Using 2001-01-29-04 commercial trunk build Win98 Haven't yet gotten to today's builds on other platforms... Clicking on Search button to initiate a simple search messages crashes. No talkback report(s).
Keywords: crash, nsbeta1
Priority: -- → P1
QA Contact: esther → laurel
Seems to be IMAP only, OK for POP and news. Happens on linux using jan29 commercial trunk build -- exits application.
OS: Windows 98 → All
Hardware: PC → All
marking nsbeta1+ and moving to mozilla0.8 It would be great if we could get a stack trace from talkback or from a debug build.
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.8
I tried this on Win NT using today's build. Running into same problem. Posting the stack trace.
Status: NEW → ASSIGNED
strlen() line 78 nsCRT::strlen(const char * 0x00000000) line 136 + 9 bytes nsMsgSearchAdapter::EncodeImapTerm(nsIMsgSearchTerm * 0x06e39430, int 0, const unsigned short * 0x0012d5fc, const unsigned short * 0x0012d5fc, char * * 0x06f1afb0) line 617 + 206 bytes nsMsgSearchAdapter::EncodeImap(char * * 0x0012d5dc, nsISupportsArray * 0x06e60650, const unsigned short * 0x0012d5fc, const unsigned short * 0x0012d5fc, int 0) line 708 + 36 bytes nsMsgSearchOnlineMail::Encode(nsCString & {...}, nsISupportsArray * 0x06e60650, const unsigned short * 0x06f19230) line 156 + 126 bytes nsMsgSearchOnlineMail::ValidateTerms(nsMsgSearchOnlineMail * const 0x06f192d0) line 55 + 34 bytes nsMsgSearchScopeTerm::InitializeAdapter(nsISupportsArray * 0x06e60650) line 1418 + 26 bytes nsMsgSearchSession::Initialize() line 465 + 20 bytes nsMsgSearchSession::Search(nsMsgSearchSession * const 0x06e66900, nsIMsgWindow * 0x06ea6e30) line 308 + 8 bytes XPTC_InvokeByIndex(nsISupports * 0x06e66900, unsigned int 20, unsigned int 1, nsXPTCVariant * 0x0012d8e4) line 139 nsXPCWrappedNativeClass::CallWrappedMethod(JSContext * 0x057d64a0, nsXPCWrappedNative * 0x06ea2bc0, const XPCNativeMemberDescriptor * 0x06ea0e10, nsXPCWrappedNativeClass::CallMode CALL_METHOD, unsigned int 1, long * 0x03510f0c, long * 0x0012dacc) line 920 + 42 bytes WrappedNative_CallMethod(JSContext * 0x057d64a0, JSObject * 0x034dd718, unsigned int 1, long * 0x03510f0c, long * 0x0012dacc) line 250 + 34 bytes js_Invoke(JSContext * 0x057d64a0, unsigned int 1, unsigned int 0) line 777 + 23 bytes js_Interpret(JSContext * 0x057d64a0, long * 0x0012e878) line 2670 + 15 bytes js_Invoke(JSContext * 0x057d64a0, unsigned int 1, unsigned int 2) line 794 + 13 bytes js_InternalInvoke(JSContext * 0x057d64a0, JSObject * 0x034dd080, long 55437896, unsigned int 0, unsigned int 1, long * 0x0012ea10, long * 0x0012e9a0) line 866 + 20 bytes JS_CallFunctionValue(JSContext * 0x057d64a0, JSObject * 0x034dd080, long 55437896, unsigned int 1, long * 0x0012ea10, long * 0x0012e9a0) line 3264 + 31 bytes nsJSContext::CallEventHandler(nsJSContext * const 0x057d6b80, void * 0x034dd080, void * 0x034dea48, unsigned int 1, void * 0x0012ea10, int * 0x0012ea0c, int 0) line 931 + 33 bytes nsJSEventListener::HandleEvent(nsIDOMEvent * 0x06e9fd14) line 154 + 64 bytes nsEventListenerManager::HandleEventSubType(nsListenerStruct * 0x06d71a10, nsIDOMEvent * 0x06e9fd14, nsIDOMEventTarget * 0x06d71b68, unsigned int 8, unsigned int 7) line 838 + 19 bytes nsEventListenerManager::HandleEvent(nsIPresContext * 0x057a27e0, nsEvent * 0x0012f2b0, nsIDOMEvent * * 0x0012f248, nsIDOMEventTarget * 0x06d71b68, unsigned int 7, nsEventStatus * 0x0012f2f4) line 1720 + 39 bytes nsXULElement::HandleDOMEvent(nsXULElement * const 0x06d71b60, nsIPresContext * 0x057a27e0, nsEvent * 0x0012f2b0, nsIDOMEvent * * 0x0012f248, unsigned int 1, nsEventStatus * 0x0012f2f4) line 3455 PresShell::HandleDOMEventWithTarget(PresShell * const 0x057df5a0, nsIContent * 0x06d71b60, nsEvent * 0x0012f2b0, nsEventStatus * 0x0012f2f4) line 4961 + 39 bytes nsButtonBoxFrame::MouseClicked(nsIPresContext * 0x057a27e0, nsGUIEvent * 0x0012f49c) line 165 nsButtonBoxFrame::HandleEvent(nsButtonBoxFrame * const 0x034ebcfc, nsIPresContext * 0x057a27e0, nsGUIEvent * 0x0012f49c, nsEventStatus * 0x0012f788) line 126 PresShell::HandleEventInternal(nsEvent * 0x0012f49c, nsIView * 0x00000000, unsigned int 1, nsEventStatus * 0x0012f788) line 4929 + 38 bytes PresShell::HandleEventWithTarget(PresShell * const 0x057df5a0, nsEvent * 0x0012f49c, nsIFrame * 0x034ebcfc, nsIContent * 0x06d71b60, unsigned int 1, nsEventStatus * 0x0012f788) line 4895 + 22 bytes nsEventStateManager::CheckForAndDispatchClick(nsEventStateManager * const 0x06dfb990, nsIPresContext * 0x057a27e0, nsMouseEvent * 0x0012f894, nsEventStatus * 0x0012f788) line 1971 + 61 bytes nsEventStateManager::PostHandleEvent(nsEventStateManager * const 0x06dfb998, nsIPresContext * 0x057a27e0, nsEvent * 0x0012f894, nsIFrame * 0x034ebcfc, nsEventStatus * 0x0012f788, nsIView * 0x057a6b40) line 1080 + 28 bytes PresShell::HandleEventInternal(nsEvent * 0x0012f894, nsIView * 0x057a6b40, unsigned int 1, nsEventStatus * 0x0012f788) line 4934 + 43 bytes PresShell::HandleEvent(PresShell * const 0x057df5a4, nsIView * 0x057a6b40, nsGUIEvent * 0x0012f894, nsEventStatus * 0x0012f788, int 1, int & 1) line 4849 + 25 bytes nsView::HandleEvent(nsView * const 0x057a6b40, nsGUIEvent * 0x0012f894, unsigned int 28, nsEventStatus * 0x0012f788, int 1, int & 1) line 379 nsViewManager2::DispatchEvent(nsViewManager2 * const 0x057a6030, nsGUIEvent * 0x0012f894, nsEventStatus * 0x0012f788) line 1520 HandleEvent(nsGUIEvent * 0x0012f894) line 68 nsWindow::DispatchEvent(nsWindow * const 0x057c9184, nsGUIEvent * 0x0012f894, nsEventStatus & nsEventStatus_eIgnore) line 687 + 10 bytes nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012f894) line 708 nsWindow::DispatchMouseEvent(unsigned int 301, nsPoint * 0x00000000) line 3948 + 21 bytes ChildWindow::DispatchMouseEvent(unsigned int 301, nsPoint * 0x00000000) line 4158 nsWindow::ProcessMessage(unsigned int 514, unsigned int 0, long 7995971, long * 0x0012fc48) line 2965 + 24 bytes nsWindow::WindowProc(HWND__ * 0x01261186, unsigned int 514, unsigned int 0, long 7995971) line 922 + 27 bytes USER32! 77e71820()
seems to be more of imap problem than a search problem. your thoughts, david?
no, it's a search backend problem, almost certainly introduced by taka's recent checkins to this file. I can look more into it, but this isn't imap code it's crashing in; it's a simple null pointer problem.
taka, I think this is a regression introduced by some recent checkins to nsMsgSearchAdaptor.cpp (probably 1.27) - ConvertFromUnicode(nsAutoString(convertedValue), nsAutoString(destCharset), &value); is leaving value as null, which crashes a bit further down. I'm not sure what the intention here was - could you help gayatri with this? Thanks!
sorry about that, charset must come first.
can you add some error handling in case this fails? thanks!
Applied patch and tested. It works. Thanks taka!
sr=bienvenu
Blocks: 66944
Reassigning to taka.
Assignee: gayatrib → taka
No longer blocks: 66944
Status: ASSIGNED → NEW
who could be a reviewer?
Status: NEW → ASSIGNED
you've removed a null check on "value". it looks like if "value" was null, "oldValue" would be set to null, and ConvertFromUnicode() returns NS_OK, nsCRT::free(oldValue); would crash can you change it to be CRTFREEIF(oldValue); someone might change ConvertFromUnicode() to return NS_OK but null for the out parameter. (it may do that already, I don't know) please provide a new patch.
ccing self. I see this in today's build on my win98 system and talkback even worked...
sr=sspitzer, check it in.
checked in. mark as fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
OK using feb8 commercial trunk builds: win98, mac OS 9.0, linux rh6.0
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
Component: MailNews: Search → MailNews: Message Display
QA Contact: laurel → search
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: