Crash [@ nsMsgMaildirStore::GetNewMsgOutputStream]

VERIFIED FIXED in Thunderbird 63.0

Status

defect
--
critical
VERIFIED FIXED
3 years ago
8 months ago

People

(Reporter: rkent, Assigned: mkmelin)

Tracking

(Blocks 1 bug, {crash})

Trunk
Thunderbird 63.0
Dependency tree / graph

Thunderbird Tracking Flags

(thunderbird_esr6062+ verified, thunderbird63 fixed)

Details

(crash signature, )

Attachments

(1 attachment, 1 obsolete attachment)

This is another null database error, in this case with an NS_ERROR check that does nothing in release builds.
bp-768755f4-b03b-4bfd-973b-d16b72160525

0 	xul.dll	nsMsgMaildirStore::GetNewMsgOutputStream(nsIMsgFolder*, nsIMsgDBHdr**, bool*, nsIOutputStream**)	c:/builds/moz2_slave/tb-rel-c-esr45-w32_bld-0000000/build/mailnews/local/src/nsMsgMaildirStore.cpp:599
1 	xul.dll	nsMsgDBFolder::GetMsgStore(nsIMsgPluggableStore**)	c:/builds/moz2_slave/tb-rel-c-esr45-w32_bld-0000000/build/mailnews/base/util/nsMsgDBFolder.cpp:743
2 	xul.dll	nsMsgLocalMailFolder::InitCopyMsgHdrAndFileStream()	c:/builds/moz2_slave/tb-rel-c-esr45-w32_bld-0000000/build/mailnews/local/src/nsLocalMailFolder.cpp:2100
Keywords: crash
Pretty rare, but of course maildir is not the default
Now less rare. But frame 1 has changed to nsMsgLocalMailFolder::InitCopyMsgHdrAndFileStream.

For example 60.0b4 bp-a36ac7e3-26a8-4808-87b7-f21220180424
 0 	xul.dll	nsMsgMaildirStore::GetNewMsgOutputStream(nsIMsgFolder*, nsIMsgDBHdr**, bool*, nsIOutputStream**)	C:/builds/moz2_slave/tb-rel-c-beta-w32_bld-00000000/build/mailnews/local/src/nsMsgMaildirStore.cpp:599
1 	xul.dll	nsMsgLocalMailFolder::InitCopyMsgHdrAndFileStream()	C:/builds/moz2_slave/tb-rel-c-beta-w32_bld-00000000/build/mailnews/local/src/nsLocalMailFolder.cpp:2121
2 	xul.dll	nsMsgLocalMailFolder::BeginCopy(nsIMsgDBHdr*)	C:/builds/moz2_slave/tb-rel-c-beta-w32_bld-00000000/build/mailnews/local/src/nsLocalMailFolder.cpp:2140
3 	xul.dll	nsCopyMessageStreamListener::OnStartRequest(nsIRequest*, nsISupports*)	C:/builds/moz2_slave/tb-rel-c-beta-w32_bld-00000000/build/mailnews/base/src/nsCopyMessageStreamListener.cpp:101
4 	xul.dll	mozilla::net::nsStreamListenerTee::OnStartRequest(nsIRequest*, nsISupports*)	netwerk/base/nsStreamListenerTee.cpp:22
5 	xul.dll	`anonymous namespace'::SyncRunnable2<nsIImapMailFolderSink, nsIMsgMailNewsUrl*, unsigned int>::Run	C:/builds/moz2_slave/tb-rel-c-beta-w32_bld-00000000/build/mailnews/imap/src/nsSyncRunnableHelpers.cpp:147
#77 crash for version 60.

bp-007ef6f3-922a-427f-a187-bd7750180815 (some user) clicked Archive

bp-eb157b91-27c7-4b85-9034-6cb280180815 (some user) Sending a new email via LIghtning Event creation (technically edit) I believe the issue is I haven't opened the Sent folder yet and it crashes. A similar thing happened when I was trying to Archive but hadn't yet opened the 2018 archive for the first time. Installation was standard but a profile and all related prefs were put in prior to first start.
Flags: needinfo?(m_kato)
Doens't help to only output an error message when there's no db...
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(m_kato)
Attachment #9003399 - Flags: review?(jorgk)
Comment on attachment 9003399 [details] [diff] [review]
bug1275948_maildir_no_db_crash.patch

Review of attachment 9003399 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/local/src/nsMsgMaildirStore.cpp
@@ +587,5 @@
>    *aReusable = false; // message per file
>  
>    nsCOMPtr<nsIMsgDatabase> db;
>    aFolder->GetMsgDatabase(getter_AddRefs(db));
> +  NS_ENSURE_STATE(db);

How about some error checking instead?
I think Kent didn't use to trust that for this case. But either way is fine by me.
Checking rv instead
Attachment #9003399 - Attachment is obsolete: true
Attachment #9003399 - Flags: review?(jorgk)
Attachment #9004258 - Flags: review?(jorgk)
Comment on attachment 9004258 [details] [diff] [review]
bug1275948_maildir_no_db_crash.patch

Thanks, I think that's the way to go.
Attachment #9004258 - Flags: review?(jorgk)
Attachment #9004258 - Flags: review+
Attachment #9004258 - Flags: approval-comm-esr60+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/64f649a0558a
fix crash in nsMsgMaildirStore::GetNewMsgOutputStream(). r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 63.0
v.fixed - No crashes in 64.0beta and newer versions of 60.n
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.