Closed Bug 433854 Opened 16 years ago Closed 16 years ago

Crash [@ nsDependentCString::nsDependentCString][@ nsImapService::StreamMessage]

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: standard8, Assigned: standard8)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Seen in the 3.0a1 crash-stats reports:

ID: d1dfa0d9-2204-11dd-bdae-001cc45a2ce4
Frame  	Module  	Signature [Expand]  	Source
0 	thunderbird-bin 	nsDependentCString::nsDependentCString 	nsCharTraits.h:629
1 	thunderbird-bin 	nsImapService::StreamMessage 	mozilla/mailnews/imap/src/nsImapService.cpp:1171
2 	libxpcom_core.so 	libxpcom_core.so@0x647b8 	
3 	thunderbird-bin 	XPCWrappedNative::CallMethod 	mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:2369
4 	thunderbird-bin 	XPC_WN_CallMethod 	mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp:1473
5 	libmozjs.so 	js_Invoke 	mozilla/js/src/jsinvoke.c:1296
6 	libmozjs.so 	js_Interpret 	mozilla/js/src/jsinterp.c:4851
7 	libmozjs.so 	js_Invoke 	mozilla/js/src/jsinvoke.c:1312
8 	libmozjs.so 	js_InternalInvoke 	mozilla/js/src/jsinvoke.c:1368
9 	libmozjs.so 	JS_CallFunctionValue 	mozilla/js/src/jsapi.c:5053
10 	thunderbird-bin 	nsJSContext::CallEventHandler 	mozilla/dom/src/base/nsJSEnvironment.cpp:1962
11 	thunderbird-bin 	nsGlobalWindow::RunTimeout 	mozilla/dom/src/base/nsGlobalWindow.cpp:7762
12 	thunderbird-bin 	nsGlobalWindow::TimerCallback 	mozilla/dom/src/base/nsGlobalWindow.cpp:8093
13 	libxpcom_core.so 	libxpcom_core.so@0x5a76e 	
14 	libxpcom_core.so 	libxpcom_core.so@0x5acfc 	
15 	libxpcom_core.so 	libxpcom_core.so@0x582eb 	
16 	libxpcom_core.so 	libxpcom_core.so@0x26d4a 	
17 	thunderbird-bin 	nsBaseAppShell::Run 	mozilla/widget/src/xpwidgets/nsBaseAppShell.cpp:170
18 	thunderbird-bin 	nsAppStartup::Run 	mozilla/toolkit/components/startup/src/nsAppStartup.cpp:181
19 	thunderbird-bin 	XRE_main 	mozilla/toolkit/xre/nsAppRunner.cpp:3170
20 	thunderbird-bin 	main 	mozilla/mail/app/nsMailApp.cpp:103
21 	libc-2.7.so 	libc-2.7.so@0x1644f 	

Affected line:

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/imap/src/nsImapService.cpp&rev=1.337&mark=1171#1171

The rule is don't try and create an nsDependentCString if the parameter is null.
Summary: Crash [@ nsImapService::StreamMessage] → Crash [@ nsDependentCString::nsDependentCString][@ nsImapService::StreamMessage]
Attached patch The fixSplinter Review
I've done this fix slightly differently. I took a look around and decided that it was probably best to change the aAdditionalHeader to an ACString, hence removing the need for nsDependentCString. I looked at aMessageURI as well, but decided at the moment its probably best leaving that a a simple "string", and hence added some null-pointer checks for it.
Attachment #321061 - Flags: superreview?(neil)
Attachment #321061 - Flags: review?(neil)
Attachment #321061 - Flags: superreview?(neil)
Attachment #321061 - Flags: superreview+
Attachment #321061 - Flags: review?(neil)
Attachment #321061 - Flags: review+
Patch checked in -> fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
Product: Core → MailNews Core
Crash Signature: [@ nsDependentCString::nsDependentCString] [@ nsImapService::StreamMessage]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: