Closed Bug 149605 Opened 22 years ago Closed 22 years ago

crash opening mail window after new account created

Categories

(MailNews Core :: Backend, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: waterson, Assigned: mscott)

Details

(Keywords: crash)

I've just created a new profile on OS/X, and crashed immediately after 
completing the account setup dialog. Now, I crash whenever I try to open 
the mail window.

It looks like mEncoder is null at about line 237 of nsCollation.cpp. There's 
some RDF on the stack, so I'll look at it a little bit to try to figure out what's 
going on.

Here's the stack:

#0  0x0c5f8418 in nsCollation::UnicodeToChar (this=0x15a77d90, aSrc=
@0xbfffc28c, dst=0xbfffc31c, aCharset=@0x15a77d68) at ../../../../mozilla/
intl/locale/src/nsCollation.cpp:237
#1  0x0c5f30e4 in nsCollationUnix::GetSortKeyLen (this=0x15a77d40, 
strength=kCollationCaseInSensitive, stringIn=@0xbfffc3d0, outLen=
0xbfffc4c0) at ../../../../../mozilla/intl/locale/src/unix/nsCollationUnix.cpp:202
#2  0x15baff94 in nsMsgFolder::CreateCollationKey (this=0x15b33730, 
aSource=@0xbfffc3d0, aKey=0xbfffc4bc, aLength=0xbfffc4c0) at ../../../../
mozilla/mailnews/base/util/nsMsgFolder.cpp:2874
#3  0x15bafe58 in nsMsgFolder::GetSortKey (this=0x15b33730, aKey=
0xbfffc4bc, aLength=0xbfffc4c0) at ../../../../mozilla/mailnews/base/util/
nsMsgFolder.cpp:2854
#4  0x151f741c in nsMsgFolderDataSource::createFolderNameNode 
(this=0x15a6b5a0, folder=0x15b3374c, target=0xbfffc638, sort=1) at ../../../
../mozilla/mailnews/base/src/nsMsgFolderDataSource.cpp:1074
#5  0x151f6d7c in nsMsgFolderDataSource::createFolderNode (this=
0x15a6b5a0, folder=0x15b3374c, property=0x14a6a600, target=
0xbfffc638) at ../../../../mozilla/mailnews/base/src/
nsMsgFolderDataSource.cpp:999
#6  0x151f3ed0 in nsMsgFolderDataSource::GetTarget (this=0x15a6b5a0, 
source=0x15b33730, property=0x14a6a600, tv=1, target=0xbfffc638) at ../
../../../mozilla/mailnews/base/src/nsMsgFolderDataSource.cpp:369
#7  0x0521ea74 in CompositeDataSourceImpl::GetTarget (this=
0x12e8b9b0, aSource=0x15b33730, aProperty=0x14a6a600, 
aTruthValue=1, aResult=0xbfffc638) at ../../../../mozilla/rdf/base/src/
nsCompositeDataSource.cpp:831
#8  0x0a7dc684 in nsTemplateRule::ComputeAssignmentFor (this=
0x116ad1e0, aConflictSet=@0x1590c384, aMatch=0x15b35328, 
aVariable=4, aValue=0xbfffc71c) at ../../../../../mozilla/content/xul/templates/
src/nsTemplateRule.cpp:334
#9  0x0a7da370 in nsTemplateMatch::GetAssignmentFor (this=
0x15b35328, aConflictSet=@0x1590c384, aVariable=4, aValue=
0xbfffc71c) at ../../../../../mozilla/content/xul/templates/src/
nsTemplateMatch.cpp:55
#10 0x0a7f2160 in nsXULTreeBuilder::CompareMatches (this=
0x1590c2e0, aLeft=0x15b24970, aRight=0x15b35328) at ../../../../../mozilla/
content/xul/templates/src/nsXULTreeBuilder.cpp:1902
#11 0x0a7f1dec in nsXULTreeBuilder::Compare (aLeft=0x15b35500, 
aRight=0x15b3550c, aClosure=0x1590c2e0) at ../../../../../mozilla/content/
xul/templates/src/nsXULTreeBuilder.cpp:1835
#12 0x01365c9c in NS_QuickSort (a=0x15b35500, n=5, es=12, cmp=
0xa7f1d9c <nsXULTreeBuilder::Compare(void const *, void const *, void *
)>, data=0x1590c2e0) at ../../../mozilla/xpcom/ds/nsQuickSort.cpp:118
#13 0x0a7f1404 in nsXULTreeBuilder::OpenSubtreeOf (this=0x1590c2e0, 
aSubtree=0x15b34600, aContainer=0x15b0e810, aDelta=0xbfffcdb8) at ../
../../../../mozilla/content/xul/templates/src/nsXULTreeBuilder.cpp:1688
#14 0x0a7f1368 in nsXULTreeBuilder::OpenSubtreeOf (this=0x1590c2e0, 
aSubtree=0x1590c3d8, aContainer=0x12f2d620, aDelta=0xbfffcf24) at ../../
../../../mozilla/content/xul/templates/src/nsXULTreeBuilder.cpp:1674
#15 0x0a7f0ddc in nsXULTreeBuilder::OpenContainer (this=0x1590c2e0, 
aIndex=-1, aContainer=0x12f2d620) at ../../../../../mozilla/content/xul/
templates/src/nsXULTreeBuilder.cpp:1566
#16 0x0a7eeee8 in nsXULTreeBuilder::Rebuild (this=0x1590c2e0) at ../../
../../../mozilla/content/xul/templates/src/nsXULTreeBuilder.cpp:1073
#17 0x0a80101c in nsXULTemplateBuilder::AttributeChanged (this=
0x1590c2e0, aDocument=0x14a384b0, aContent=0x1589b530, 
aNameSpaceID=0, aAttribute=0x5a3480, aModType=2, aHint=-1) at ../../../
../../mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp:358
#18 0x0a79ba20 in nsXULDocument::AttributeChanged (this=
0x14a384b0, aElement=0x1589b530, aNameSpaceID=0, aAttribute=
0x5a3480, aModType=2, aHint=-1) at ../../../../../mozilla/content/xul/
document/src/nsXULDocument.cpp:2201
#19 0x0a774dc4 in nsXULElement::SetAttr (this=0x1589b530, 
aNodeInfo=0x1591d4b0, aValue=@0x15b24460, aNotify=1) at ../../../../../
mozilla/content/xul/content/src/nsXULElement.cpp:2723
#20 0x0a76ee30 in nsXULElement::SetAttribute (this=0x1589b530, 
aName=@0x15b24440, aValue=@0x15b24460) at ../../../../../mozilla/
content/xul/content/src/nsXULElement.cpp:1315
#21 0x0149afa8 in _XPTC_InvokeByIndex ()
#22 0x01419704 in XPTC_InvokeByIndex (that=0x1589b534, 
methodIndex=30, paramCount=2, params=0xbfffd5ac) at ../../../../../../../
mozilla/xpcom/reflect/xptcall/src/md/unix/
xptcinvoke_ppc_rhapsody.cpp:144
#23 0x022e74c8 in XPCWrappedNative::CallMethod (ccx=@0xbfffd80c, 
mode=CALL_METHOD) at ../../../../../mozilla/js/src/xpconnect/src/
xpcwrappednative.cpp:1994
#24 0x022f6b44 in XPC_WN_CallMethod (cx=0x12df1510, obj=
0x15989a38, argc=2, argv=0x159d5b38, vp=0xbfffd8fc) at ../../../../../mozilla/
js/src/xpconnect/src/xpcwrappednativejsops.cpp:1266
#25 0x0078aa5c in js_Invoke (cx=0x12df1510, argc=2, flags=0) at ../../../
mozilla/js/src/jsinterp.c:788
#26 0x0079bbd4 in js_Interpret (cx=0x12df1510, result=0xbfffdd60) at ../../
../mozilla/js/src/jsinterp.c:2743
#27 0x0078aaec in js_Invoke (cx=0x12df1510, argc=1, flags=2) at ../../../
mozilla/js/src/jsinterp.c:805
#28 0x0078aefc in js_InternalInvoke (cx=0x12df1510, obj=0x14a35dc8, 
fval=346251064, flags=0, argc=1, argv=0xbfffdfbc, rval=0xbfffdf38) at ../../../
mozilla/js/src/jsinterp.c:880
#29 0x0074c94c in JS_CallFunctionValue (cx=0x12df1510, obj=
0x14a35dc8, fval=346251064, argc=1, argv=0xbfffdfbc, rval=0xbfffdf38) at 
../../../mozilla/js/src/jsapi.c:3424
#30 0x080633ac in nsJSContext::CallEventHandler (this=0x12df1440, 
aTarget=0x14a35dc8, aHandler=0x14a35f38, argc=1, argv=0xbfffdfbc, 
aBoolResult=0xbfffe19c, aReverseReturnResult=0) at ../../../../mozilla/dom/
src/base/nsJSEnvironment.cpp:1041
#31 0x080bbfe0 in nsJSEventListener::HandleEvent (this=0x14a6b560, 
aEvent=0x15a2eda8) at ../../../../mozilla/dom/src/events/
nsJSEventListener.cpp:182
#32 0x0a577330 in nsEventListenerManager::HandleEventSubType 
(this=0x14a66bf0, aListenerStruct=0x14a4ff70, aDOMEvent=0x15a2eda8, 
aCurrentTarget=0x12f26be0, aSubType=1, aPhaseFlags=7) at ../../../../
mozilla/content/events/src/nsEventListenerManager.cpp:1221
#33 0x0a579b98 in nsEventListenerManager::HandleEvent (this=
0x14a66bf0, aPresContext=0x14a38a10, aEvent=0xbfffe9a8, aDOMEvent=
0xbfffe880, aCurrentTarget=0x12f26be0, aFlags=7, aEventStatus=
0xbfffe9a4) at ../../../../mozilla/content/events/src/
nsEventListenerManager.cpp:1901
#34 0x0806bdbc in GlobalWindowImpl::HandleDOMEvent (this=
0x12f26bd0, aPresContext=0x14a38a10, aEvent=0xbfffe9a8, aDOMEvent=
0xbfffe880, aFlags=1, aEventStatus=0xbfffe9a4) at ../../../../mozilla/dom/src/
base/nsGlobalWindow.cpp:732
#35 0x0a87cbc0 in DocumentViewerImpl::LoadComplete (this=
0x14a3faf0, aStatus=0) at ../../../../mozilla/content/base/src/
nsDocumentViewer.cpp:1531
#36 0x072d3648 in nsDocShell::EndPageLoad (this=0x12f26a60, 
aProgress=0x12ec1184, aChannel=0x14a3d180, aStatus=0) at ../../../
mozilla/docshell/base/nsDocShell.cpp:3955
#37 0x072e6330 in nsWebShell::EndPageLoad (this=0x12f26a60, 
aProgress=0x12ec1184, channel=0x14a3d180, aStatus=0) at ../../../
mozilla/docshell/base/nsWebShell.cpp:719
#38 0x072d3168 in nsDocShell::OnStateChange (this=0x12f26a60, 
aProgress=0x12ec1184, aRequest=0x14a3d180, aStateFlags=131088, 
aStatus=0) at ../../../mozilla/docshell/base/nsDocShell.cpp:3870
#39 0x0786cf3c in nsDocLoaderImpl::FireOnStateChange (this=
0x12ec1170, aProgress=0x12ec1184, aRequest=0x14a3d180, 
aStateFlags=131088, aStatus=0) at ../../../mozilla/uriloader/base/
nsDocLoader.cpp:1128
#40 0x0786c00c in nsDocLoaderImpl::doStopDocumentLoad (this=
0x12ec1170, request=0x14a3d180, aStatus=0) at ../../../mozilla/uriloader/
base/nsDocLoader.cpp:760
#41 0x0786bcd8 in nsDocLoaderImpl::DocLoaderIsEmpty (this=
0x12ec1170) at ../../../mozilla/uriloader/base/nsDocLoader.cpp:667
#42 0x0786b9d4 in nsDocLoaderImpl::OnStopRequest (this=
0x12ec1170, aRequest=0x15a2b5f0, aCtxt=0x14a38a10, aStatus=0) at ../
../../mozilla/uriloader/base/nsDocLoader.cpp:597
#43 0x0304312c in nsLoadGroup::RemoveRequest (this=0x12f1a6e0, 
request=0x15a2b5f0, ctxt=0x14a38a10, aStatus=0) at ../../../../mozilla/
netwerk/base/src/nsLoadGroup.cpp:532
#44 0x119afa10 in imgRequestProxy::OnStopRequest (this=0x15a2b5f0, 
request=0x15afb2a0, ctxt=0x0, statusCode=0) at ../../../../mozilla/modules/
libpr0n/src/imgRequestProxy.cpp:391
#45 0x119ac334 in imgRequest::OnStopRequest (this=0x15afb340, 
aRequest=0x15afb2a0, ctxt=0x0, status=0) at ../../../../mozilla/modules/
libpr0n/src/imgRequest.cpp:653
#46 0x119a76f8 in ProxyListener::OnStopRequest (this=0x15afb100, 
aRequest=0x15afb2a0, ctxt=0x0, status=0) at ../../../../mozilla/modules/
libpr0n/src/imgLoader.cpp:705
#47 0x030f29fc in nsJARChannel::OnStopRequest (this=0x15afb2a0, 
jarExtractionTransport=0x15afb524, context=0x0, aStatus=0) at ../../../../../
mozilla/netwerk/protocol/jar/src/nsJARChannel.cpp:606
#48 0x0304d110 in nsOnStopRequestEvent::HandleEvent (this=
0x15afb9e0) at ../../../../mozilla/netwerk/base/src/
nsRequestObserverProxy.cpp:212
#49 0x0304bb34 in nsARequestObserverEvent::HandlePLEvent (plev=
0x15afb9e0) at ../../../../mozilla/netwerk/base/src/
nsRequestObserverProxy.cpp:115
#50 0x013e05c8 in PL_HandleEvent (self=0x15afb9e0) at ../../../mozilla/
xpcom/threads/plevent.c:596
#51 0x013e0348 in PL_ProcessPendingEvents (self=0x5814d0) at ../../../
mozilla/xpcom/threads/plevent.c:526
#52 0x013e29f4 in nsEventQueueImpl::ProcessPendingEvents (this=
0x2980b0) at ../../../mozilla/xpcom/threads/nsEventQueue.cpp:388
#53 0x047d4618 in 
nsMacNSPREventQueueHandler::ProcessPLEventQueue (this=
0x1264930) at ../../../../mozilla/widget/src/mac/nsToolkit.cpp:149
#54 0x047d43d8 in nsMacNSPREventQueueHandler::RepeatAction (this=
0x1264930, inMacEvent=@0xbffffa4c) at ../../../../mozilla/widget/src/mac/
nsToolkit.cpp:114
#55 0x047dee0c in Repeater::DoRepeaters (aMacEvent=@0xbffffa4c) at 
nsRepeater.cpp:136
#56 0x047b38ec in nsMacMessagePump::DispatchEvent (this=
0x1267480, aRealEvent=0, anEvent=0xbffffa4c) at ../../../../mozilla/widget/
src/mac/nsMacMessagePump.cpp:481
#57 0x047b351c in nsMacMessagePump::DoMessagePump (this=
0x1267480) at ../../../../mozilla/widget/src/mac/
nsMacMessagePump.cpp:289
#58 0x0479e3a8 in nsAppShell::Run (this=0x1264a00) at ../../../../mozilla/
widget/src/mac/nsAppShell.cpp:120
#59 0x03c917c8 in nsAppShellService::Run (this=0x126ba60) at ../../../../
mozilla/xpfe/appshell/src/nsAppShellService.cpp:450
#60 0x00007ee0 in main1 (argc=1, argv=0xbffffd40, nativeApp=0x0) at ../../
../mozilla/xpfe/bootstrap/nsAppRunner.cpp:1456
#61 0x000087c8 in main (argc=1, argv=0xbffffd40) at ../../../mozilla/xpfe/
bootstrap/nsAppRunner.cpp:1805
#62 0x000027f8 in _start ()
#63 0x00002628 in start ()
(gdb)
Keywords: crash
I get a few assertions before the crash, too:

WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file ../../../../
mozilla/mailnews/base/src/nsMsgAccountManager.cpp, line 1901
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file ../../../../
mozilla/mailnews/base/util/nsMsgFolder.cpp, line 2875
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file ../../../../
mozilla/mailnews/base/src/nsMsgFolderDataSource.cpp, line 1075
It looks like the charset that's being passed in here is the empty string: 
the charset converter manager is returning `success' even though it never 
gives us back a unicode encoder (probably a bug, but no the real bug). 
I18n guys, should we file something on that?
nsCharsetConverterManager::GetCharsetAtom
nsCharsetConverterManager::GetUnicodeDecoder

Those returns success even the input is an empty string. I think this is wrong.
I will talk to Frank about this.
Correction to my last comment, 
nsCharsetConverterManager::GetUnicodeDecoder returns an error
NS_ERROR_UCONV_NOCONV. The same for nsCharsetConverterManager::GetUnicodeEncoder.
225     nsCOMPtr <nsIAtom>  charsetAtom;
226     res =
mCharsetConverterManager->GetCharsetAtom(PromiseFlatString(aCharset).get(),
getter_AddRefs(charsetAtom));
227     if (NS_SUCCEEDED(res)) {
228       if (charsetAtom != mEncoderCharsetAtom) {
229         mEncoderCharsetAtom = charsetAtom;
230         res =
mCharsetConverterManager->GetUnicodeEncoder(mEncoderCharsetAtom,
getter_AddRefs(mEncoder));
231       }

If GetCharsetAtom returns success even the charset is empty and the following
atom comparison is equal then mEncoder can be null. 
waterson, is that the case of your crash?
QA Contact: gayatri → stephend
Chris, are you still seeing this?
I don't see this on 2002-09-26-08, Mac OS X 10.1.5.  Please reopen if you see
this again, thanks.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
I don't see this.  If anybody else does, please either reopen or just file a new
bug.  Thanks.  Build 2002-09-27-08, Mac OS X 10.1.5.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.