Closed Bug 301264 Opened 19 years ago Closed 15 years ago

Crash [@ nsMsgCompose::SetDocumentCharset]

Categories

(MailNews Core :: Composition, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: timeless, Assigned: mkmelin)

References

()

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Incident ID: 7426469
Stack Signature	nsMsgCompose::SetDocumentCharset 15071b7e
Product ID	MozillaTrunk
Build ID	2005070805
Trigger Time	2005-07-12 15:16:10.0
Platform	Win32
Operating System	Windows 95 4.0 build 67306684
Module	MSGCOMPO.DLL + (0000851b)
URL visited	http://adblock.mozdev.org/forum.html/no_wrap
User Comments	
Since Last Crash	20573 sec
Total Uptime	168700 sec
Trigger Reason	Access violation
Source File, Line No.
c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/mailnews/compose/src/nsMsgCompose.cpp,
line 737
Stack Trace 	
nsMsgCompose::SetDocumentCharset 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/mailnews/compose/src/nsMsgCompose.cpp,
line 737]
XPTC_InvokeByIndex 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp,
line 102]
XPCWrappedNative::CallMethod 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp,
line 2119]
XPC_WN_CallMethod 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp,
line 1348]
js_Invoke 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c,
line 1173]
js_Interpret 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c,
line 3464]
js_Invoke 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c,
line 1193]
js_InternalInvoke 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c,
line 1270]
JS_CallFunctionValue 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsapi.c, line
3920]
nsJSContext::CallEventHandler 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/dom/src/base/nsJSEnvironment.cpp,
line 1400]
nsJSEventListener::HandleEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/dom/src/events/nsJSEventListener.cpp,
line 184]
nsEventListenerManager::HandleEventSubType 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/content/events/src/nsEventListenerManager.cpp,
line 1580]
nsEventListenerManager::HandleEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/content/events/src/nsEventListenerManager.cpp,
line 1681]
nsXULElement::HandleDOMEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/content/xul/content/src/nsXULElement.cpp,
line 2201]
nsXULElement::HandleDOMEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/content/xul/content/src/nsXULElement.cpp,
line 2222]
PresShell::HandleDOMEventWithTarget 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/base/nsPresShell.cpp,
line 6448]
nsMenuFrame::OnCreate 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/xul/base/src/nsMenuFrame.cpp,
line 1668]
nsMenuFrame::OpenMenuInternal 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/xul/base/src/nsMenuFrame.cpp,
line 743]
nsMenuFrame::OpenMenu 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/xul/base/src/nsMenuFrame.cpp,
line 730]
nsMenuFrame::HandleEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/xul/base/src/nsMenuFrame.cpp,
line 426]
PresShell::HandleEventInternal 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/base/nsPresShell.cpp,
line 6413]
PresShell::HandleEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/layout/base/nsPresShell.cpp,
line 6193]
nsViewManager::HandleEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/view/src/nsViewManager.cpp,
line 2502]
nsViewManager::DispatchEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/view/src/nsViewManager.cpp,
line 2224]
HandleEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/view/src/nsView.cpp,
line 174]
nsWindow::DispatchEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/widget/src/windows/nsWindow.cpp,
line 1171]
nsWindow::DispatchMouseEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/widget/src/windows/nsWindow.cpp,
line 5794]
ChildWindow::DispatchMouseEvent 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/widget/src/windows/nsWindow.cpp,
line 6040]
nsWindow::WindowProc 
[c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/widget/src/windows/nsWindow.cpp,
line 1348]
KERNEL32.DLL + 0x35d9 (0xbff735d9)
KERNEL32.DLL + 0x2222f (0xbff9222f)
0x00638bec
QA Contact: composition
Product: Core → MailNews Core
The relevant line of code is now at http://hg.mozilla.org/comm-central/file/61d5f8fd0fe2/mailnews/compose/src/nsMsgCompose.cpp#l897

Crash stats didn't turn up any stack trace at that line in the past weeks, and the line of code seems similar to the Bonsai one.

Bienvenu, worthy of creating a patch that fixes this?
Flags: wanted-thunderbird3?
Attached patch proposed fixSplinter Review
Doesn't seem to cause any problems with an empty charset.
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #384175 - Flags: superreview?(bugzilla)
Attachment #384175 - Flags: review?(bugzilla)
Flags: wanted-thunderbird3? → wanted-thunderbird3+
Comment on attachment 384175 [details] [diff] [review]
proposed fix

>-  m_editor->SetDocumentCharacterSet(nsDependentCString(charset));
>+  m_editor->SetDocumentCharacterSet(charset ? nsDependentCString(charset): nsCString());

Use EmptyCString() rather than nsCString().

I'd like to get David's opinion on this as well, as it seems reasonable, but just in case.
Attachment #384175 - Flags: superreview?(bugzilla)
Attachment #384175 - Flags: superreview?(bienvenu)
Attachment #384175 - Flags: review?(bugzilla)
Attachment #384175 - Flags: review+
Comment on attachment 384175 [details] [diff] [review]
proposed fix

yes, seems reasonable - compFields::SetCharacterSet seems to ignore a null arg so it should be ok as well.
Attachment #384175 - Flags: superreview?(bienvenu) → superreview+
changeset:   2918:8e9c7828dce7
http://hg.mozilla.org/comm-central/rev/8e9c7828dce7

->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
OS: Windows XP → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b3
Crash Signature: [@ nsMsgCompose::SetDocumentCharset]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: