assertions on start up in GetFirstIdentityForServer() for noincoming server types (servers without identities)

RESOLVED FIXED

Status

RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: sspitzer, Assigned: sspitzer)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

assertions on start up in GetFirstIdentityForServer() for noincoming server 
types (servers without identities)

nsMsgAccountManager::GetFirstIdentityForServer(nsMsgAccountManager * const 
0x02fb0d00, nsIMsgIncomingServer * 0x03a3ac20, nsIMsgIdentity * * 0x0012d090) 
line 2007
nsMsgFolder::SetPrefFlag(nsMsgFolder * const 0x03a3ae6c) line 1531 + 65 bytes
nsMsgLocalMailFolder::GetSubFolders(nsMsgLocalMailFolder * const 0x03a3ae6c, 
nsIEnumerator * * 0x0012d184) line 498
nsMsgFolderDataSource::createFolderOpenNode(nsIMsgFolder * 0x03a3ae6c, 
nsIRDFNode * * 0x0012d21c) line 1389 + 36 bytes
nsMsgFolderDataSource::createFolderNode(nsIMsgFolder * 0x03a3ae6c, 
nsIRDFResource * 0x0132a3a8, nsIRDFNode * * 0x0012d21c) line 1009 + 16 bytes
nsMsgFolderDataSource::GetTarget(nsMsgFolderDataSource * const 0x0399a6d8, 
nsIRDFResource * 0x03a3ae50, nsIRDFResource * 0x0132a3a8, int 1, nsIRDFNode * * 
0x0012d21c) line 372 + 25 bytes
GetTargetHasAssertion(nsIRDFDataSource * 0x0399a6d8, nsIRDFResource * 
0x03a3ae50, nsIRDFResource * 0x0132a3a8, int 1, nsIRDFNode * 0x0132a468, int * 
0x0012d448) line 116 + 48 bytes
nsMsgFolderDataSource::DoFolderHasAssertion(nsIMsgFolder * 0x03a3ae6c, 
nsIRDFResource * 0x0132a3a8, nsIRDFNode * 0x0132a468, int 1, int * 0x0012d448) 
line 2152 + 34 bytes
nsMsgFolderDataSource::HasAssertion(nsMsgFolderDataSource * const 0x0399a6d8, 
nsIRDFResource * 0x03a3ae50, nsIRDFResource * 0x0132a3a8, nsIRDFNode * 
0x0132a468, int 1, int * 0x0012d448) line 530 + 33 bytes
nsXULTreeBuilder::IsContainerOpen(nsIRDFResource * 0x03a3ae50, int * 
0x0012d448) line 1819
nsXULTreeBuilder::OpenSubtreeOf(nsTreeRows::Subtree * 0x03971cc0, 
nsIRDFResource * 0x02fb53c8, int * 0x0012d688) line 1655
nsXULTreeBuilder::OpenContainer(int -1, nsIRDFResource * 0x02fb53c8) line 1570
nsXULTreeBuilder::Rebuild(nsXULTreeBuilder * const 0x03971bc8) line 1075
nsXULTemplateBuilder::AttributeChanged(nsXULTemplateBuilder * const 0x03971bd0, 
nsIDocument * 0x014bb990, nsIContent * 0x03010b28, int 0, nsIAtom * 0x013d0150, 
int 2, nsChangeHint nsChangeHint_Unknown) line 360
nsXULDocument::AttributeChanged(nsXULDocument * const 0x014bb990, nsIContent * 
0x03010b28, int 0, nsIAtom * 0x013d0150, int 2, nsChangeHint 
nsChangeHint_Unknown) line 2201
nsXULElement::SetAttr(nsXULElement * const 0x03010b28, nsINodeInfo * 
0x03e322b8, const nsAString & {...}, int 1) line 2750
nsXULElement::SetAttribute(nsXULElement * const 0x03010b2c, const nsAString & 
{...}, const nsAString & {...}) line 1326 + 31 bytes
XPTC_InvokeByIndex(nsISupports * 0x03010b2c, unsigned int 30, unsigned int 2, 
nsXPTCVariant * 0x0012dd30) line 106
XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode 
CALL_METHOD) line 1994 + 42 bytes
XPC_WN_CallMethod(JSContext * 0x0132fb98, JSObject * 0x03052338, unsigned int 
2, long * 0x03db01c4, long * 0x0012dfe0) line 1266 + 14 bytes
js_Invoke(JSContext * 0x0132fb98, unsigned int 2, unsigned int 0) line 839 + 23 
bytes
js_Interpret(JSContext * 0x0132fb98, long * 0x0012e8fc) line 2803 + 15 bytes
js_Invoke(JSContext * 0x0132fb98, unsigned int 1, unsigned int 2) line 856 + 13 
bytes
js_InternalInvoke(JSContext * 0x0132fb98, JSObject * 0x0124e6a0, long 48469912, 
unsigned int 0, unsigned int 1, long * 0x0012eb5c, long * 0x0012ea2c) line 931 
+ 20 bytes
JS_CallFunctionValue(JSContext * 0x0132fb98, JSObject * 0x0124e6a0, long 
48469912, unsigned int 1, long * 0x0012eb5c, long * 0x0012ea2c) line 3431 + 31 
bytes
nsJSContext::CallEventHandler(nsJSContext * const 0x0144ac38, void * 
0x0124e6a0, void * 0x02e39798, unsigned int 1, void * 0x0012eb5c, int * 
0x0012eb60, int 0) line 1041 + 33 bytes
nsJSEventListener::HandleEvent(nsJSEventListener * const 0x02f98970, 
nsIDOMEvent * 0x03ca3ea8) line 182 + 77 bytes
nsEventListenerManager::HandleEventSubType(nsListenerStruct * 0x02f98a50, 
nsIDOMEvent * 0x03ca3ea8, nsIDOMEventTarget * 0x014528a0, unsigned int 1, 
unsigned int 7) line 1182 + 20 bytes
nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x02f988f8, 
nsIPresContext * 0x02f60008, nsEvent * 0x0012f298, nsIDOMEvent * * 0x0012f254, 
nsIDOMEventTarget * 0x014528a0, unsigned int 7, nsEventStatus * 0x0012f2c0) 
line 1851 + 36 bytes
GlobalWindowImpl::HandleDOMEvent(GlobalWindowImpl * const 0x01452890, 
nsIPresContext * 0x02f60008, nsEvent * 0x0012f298, nsIDOMEvent * * 0x0012f254, 
unsigned int 1, nsEventStatus * 0x0012f2c0) line 766
DocumentViewerImpl::LoadComplete(DocumentViewerImpl * const 0x0145ce18, 
unsigned int 0) line 943 + 47 bytes
nsDocShell::EndPageLoad(nsIWebProgress * 0x014450cc, nsIChannel * 0x02e48c78, 
unsigned int 0) line 4114
nsWebShell::EndPageLoad(nsIWebProgress * 0x014450cc, nsIChannel * 0x02e48c78, 
unsigned int 0) line 814
nsDocShell::OnStateChange(nsDocShell * const 0x01500b5c, nsIWebProgress * 
0x014450cc, nsIRequest * 0x02e48c78, unsigned int 131088, unsigned int 0) line 
4046
nsDocLoaderImpl::FireOnStateChange(nsIWebProgress * 0x014450cc, nsIRequest * 
0x02e48c78, int 131088, unsigned int 0) line 1235
nsDocLoaderImpl::doStopDocumentLoad(nsIRequest * 0x02e48c78, unsigned int 0) 
line 870
nsDocLoaderImpl::DocLoaderIsEmpty() line 768
nsDocLoaderImpl::OnStopRequest(nsDocLoaderImpl * const 0x014450bc, nsIRequest * 
0x03cb12c0, nsISupports * 0x02f60008, unsigned int 0) line 699
nsLoadGroup::RemoveRequest(nsLoadGroup * const 0x014372a0, nsIRequest * 
0x03cb12c0, nsISupports * 0x02f60008, unsigned int 0) line 694 + 35 bytes
imgRequestProxy::OnStopRequest(nsIRequest * 0x03ca3350, nsISupports * 
0x00000000, unsigned int 0) line 392
imgRequest::OnStopRequest(imgRequest * const 0x03ca3030, nsIRequest * 
0x03ca3350, nsISupports * 0x00000000, unsigned int 0) line 654
ProxyListener::OnStopRequest(ProxyListener * const 0x03ca3480, nsIRequest * 
0x03ca3350, nsISupports * 0x00000000, unsigned int 0) line 725
nsJARChannel::OnStopRequest(nsJARChannel * const 0x03ca3354, nsIRequest * 
0x03ca3854, nsISupports * 0x00000000, unsigned int 0) line 606 + 49 bytes
nsOnStopRequestEvent::HandleEvent() line 213
nsARequestObserverEvent::HandlePLEvent(PLEvent * 0x03cd228c) line 116
PL_HandleEvent(PLEvent * 0x03cd228c) line 643 + 10 bytes
PL_ProcessPendingEvents(PLEventQueue * 0x01267f38) line 573 + 9 bytes
_md_EventReceiverProc(HWND__ * 0x00210370, unsigned int 49447, unsigned int 0, 
long 19300152) line 1308 + 9 bytes
USER32! 77e11b60()
USER32! 77e11cca()
USER32! 77e183f1()
nsAppShellService::Run(nsAppShellService * const 0x013c3fa8) line 472
main1(int 2, char * * 0x00277ba0, nsISupports * 0x00000000) line 1508 + 32 bytes
main(int 2, char * * 0x00277ba0) line 1869 + 37 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e8d326()
fixed.

Index: base/src/nsMsgAccountManager.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/src/nsMsgAccountManager.cpp,v
retrieving revision 1.262
diff -u -w -r1.262 nsMsgAccountManager.cpp
--- base/src/nsMsgAccountManager.cpp	11 Sep 2002 05:03:33 -0000	1.262
+++ base/src/nsMsgAccountManager.cpp	13 Sep 2002 19:03:43 -0000
@@ -2001,11 +2001,21 @@
   nsresult rv = GetIdentitiesForServer(aServer, getter_AddRefs(identities));
   NS_ENSURE_SUCCESS(rv, rv);
 
+  // not all servers have identities
+  // for example, Local Folders
+  PRUint32 numIdentities;
+  rv = identities->Count(&numIdentities);
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  if (numIdentities > 0) {
   nsCOMPtr<nsIMsgIdentity> identity;
   rv = identities->QueryElementAt(0, NS_GET_IID(nsIMsgIdentity),
                                   (void **)getter_AddRefs(identity));
   NS_ENSURE_SUCCESS(rv, rv);
   NS_IF_ADDREF(*aIdentity = identity);
+  }
+  else
+    *aIdentity = nsnull;
   return rv;
 }
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.