Closed
Bug 460416
Opened 17 years ago
Closed 17 years ago
Crash in account wizard [@ nsCOMPtr<nsIMsgDatabase>::assign_with_AddRef(nsISupports * rawPtr=0x00000000)]
Categories
(MailNews Core :: Database, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b1
People
(Reporter: rkent, Assigned: rkent)
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
|
585 bytes,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
I'm getting a crash in the account wizard on initial setup of a profile. I'm setting up an IMAP profile. The crash seems to be occurring because the mDatabase is getting reset to zero in the middle of the call to GetDatabase.
The crash is occurring here in nsImapMailFolder::GetDBFolderInfoAndDB because mDatabase is zero, even though rv is also zero:
nsresult rv = GetDatabase(nsnull);
if (NS_FAILED(rv))
return rv;
NS_ADDREF(*db = mDatabase); <=== crash occurs here
I traced the point where the mDatabase is being set to zero, and it is occurring here:
msgbsutl.dll!nsCOMPtr<nsIMsgDatabase>::assign_with_AddRef(nsISupports * rawPtr=0x00000000) Line 1172 C++
msgbsutl.dll!nsCOMPtr<nsIMsgDatabase>::operator=(nsIMsgDatabase * rhs=0x00000000) Line 641 C++
msgbsutl.dll!nsMsgDBFolder::SetMsgDatabase(nsIMsgDatabase * aMsgDatabase=0x00000000) Line 775 C++
> msgimap.dll!nsImapMailFolder::CreateSubFolders(nsILocalFile * path=0x05cb0ae8) Line 583 C++
msgimap.dll!nsImapMailFolder::GetSubFolders(nsISimpleEnumerator * * aResult=0x00000000) Line 618 + 0x14 bytes C++
msgbsutl.dll!nsMsgDBFolder::GetFolderWithFlags(unsigned int aFlags=0x00001000, nsIMsgFolder * * aResult=0x001290fc) Line 3582 C++
msgbase.dll!nsMessengerWinIntegration::SetupInbox() Line 1138 + 0x45 bytes C++
msgbase.dll!nsMessengerWinIntegration::UpdateUnreadCount() Line 1168 + 0x8 bytes C++
msgbase.dll!nsMessengerWinIntegration::OnItemBoolPropertyChanged(nsIMsgFolder * aItem=0x05e4bd9c, nsIAtom * aProperty=0x05ee0c38, int aOldValue=0x00000000, int aNewValue=0x00000001) Line 880 + 0xb bytes C++
msgbsutl.dll!nsMsgDBFolder::NotifyBoolPropertyChanged(nsIAtom * aProperty=0x05ee0c38, int aOldValue=0x00000000, int aNewValue=0x00000001) Line 4148 + 0x76 bytes C++
msgbase.dll!nsMsgAccountManager::notifyDefaultServerChange(nsIMsgAccount * aOldAccount=0x00000000, nsIMsgAccount * aNewAccount=0x04fc6110) Line 825 C++
msgbase.dll!nsMsgAccountManager::SetDefaultAccount(nsIMsgAccount * aDefaultAccount=0x04fc6110) Line 789 C++
msgbase.dll!nsMsgAccountManager::GetDefaultAccount(nsIMsgAccount * * aDefaultAccount=0x001293a4) Line 760 C++
msgbase.dll!nsMessengerWinIntegration::SetupInbox() Line 1094 + 0x3a bytes C++
msgbase.dll!nsMessengerWinIntegration::UpdateUnreadCount() Line 1168 + 0x8 bytes C++
msgbase.dll!nsMessengerWinIntegration::OnItemIntPropertyChanged(nsIMsgFolder * aItem=0x05f812ac, nsIAtom * aProperty=0x05e029a8, int aOldValue=0xffffffff, int aNewValue=0x00000000) Line 964 + 0xb bytes C++
msgbase.dll!nsMsgMailSession::OnItemIntPropertyChanged(nsIMsgFolder * aItem=0x05f812ac, nsIAtom * aProperty=0x05e029a8, int aOldValue=0xffffffff, int aNewValue=0x00000000) Line 157 + 0x5a bytes C++
msgbsutl.dll!nsMsgDBFolder::NotifyIntPropertyChanged(nsIAtom * aProperty=0x05e029a8, int aOldValue=0xffffffff, int aNewValue=0x00000000) Line 4139 + 0x40 bytes C++
msgbsutl.dll!nsMsgDBFolder::UpdateSummaryTotals(int force=0x00000001) Line 3307 C++
msgimap.dll!nsImapMailFolder::UpdateSummaryTotals(int force=0x00000001) Line 1600 + 0x23 bytes C++
msgimap.dll!nsImapMailFolder::GetDatabase(nsIMsgWindow * aMsgWindow=0x00000000) Line 673 C++
msgimap.dll!nsImapMailFolder::GetDBFolderInfoAndDB(nsIDBFolderInfo * * folderInfo=0x001296c4, nsIMsgDatabase * * db=0x001296c8) Line 1880 + 0x13 bytes C++
msgbsutl.dll!nsMsgDBFolder::ReadDBFolderInfo(int force=0x00000000) Line 523 + 0x45 bytes C++
msgbsutl.dll!nsMsgDBFolder::SetFlag(unsigned int flag=0x00000400) Line 3483 C++
msgbsutl.dll!nsMsgIdentity::setFolderPref(const char * prefname=0x026421e4, const nsACString_internal & value={...}, unsigned int folderflag=0x00000400) Line 359 + 0x29 bytes C++
msgbsutl.dll!nsMsgIdentity::SetDraftFolder(const nsACString_internal & value={...}) Line 262 + 0x19 bytes C++
.. remainder of stack snipped
| Assignee | ||
Comment 1•17 years ago
|
||
I don't know if this is the best approach or not, but this simple save and restore stops the crash. You make the call, David.
Assignee: nobody → kent
Status: NEW → ASSIGNED
Attachment #343979 -
Flags: superreview?(bienvenu)
Attachment #343979 -
Flags: review?(bienvenu)
Updated•17 years ago
|
Attachment #343979 -
Flags: superreview?(bienvenu)
Attachment #343979 -
Flags: superreview+
Attachment #343979 -
Flags: review?(bienvenu)
Attachment #343979 -
Flags: review+
Comment 2•17 years ago
|
||
Comment on attachment 343979 [details] [diff] [review]
Save and restore mDatabase locally
yes, it's an ugly hack, but I'm not sure we can guarantee that UpdateSummaryTotals won't do what it's currently doing. Probably worth filing a follow-up bug on bullet-proofing this, though.
| Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 3•17 years ago
|
||
Checked in, changeset id 657:d6fb01b2f85b
Keywords: checkin-needed
Target Milestone: --- → Thunderbird 3.0b1
| Assignee | ||
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 4•16 years ago
|
||
kent. this was not a regression, correct?
Severity: normal → critical
Keywords: crash
Updated•16 years ago
|
Summary: Crash in account wizard → Crash in account wizard [@ nsCOMPtr<nsIMsgDatabase>::assign_with_AddRef(nsISupports * rawPtr=0x00000000)]
Updated•14 years ago
|
Crash Signature: [@ nsCOMPtr<nsIMsgDatabase>::assign_with_AddRef(nsISupports * rawPtr=0x00000000)]
You need to log in
before you can comment on or make changes to this bug.
Description
•