length assertion failed in nsSaveAllAttachmentsState::ctor - MOZ_ASSERT(contentTypeArray.Length() == urlArray.Length(), displayNameArray.Length() == messageUriArray.Length());
Categories
(MailNews Core :: Attachments, defect)
Tracking
(Not tracked)
People
(Reporter: KaiE, Assigned: mkmelin)
Details
Attachments
(2 files)
4.09 KB,
message/rfc822
|
Details | |
2.27 KB,
patch
|
benc
:
review+
|
Details | Diff | Splinter Review |
I've received an email with two attachments, one of them an encrypted file.
I clicked "save all" attachments, which triggers an assertion in my debug build.
1836 MOZ_ASSERT(contentTypeArray.Length() == urlArray.Length() ==
1837 displayNameArray.Length() == messageUriArray.Length());
#6 0x00007b177682ac52 in nsSaveAllAttachmentsState::nsSaveAllAttachmentsState(nsTArray<nsTString<char> > const&, nsTArray<nsTString<char> > const&, nsTArray<nsTString<char> > const&, nsTArray<nsTString<char> > const&, char const*, bool)
(this=0x7b175ac88920, contentTypeArray=..., urlArray=..., displayNameArray=..., messageUriArray=..., dirName=0x7b175b244058 "/tmp", detachingAttachments=<optimized out>) at /home/user/moz/commcent/mozilla/comm/mailnews/base/src/nsMessenger.cpp:1836
#7 0x00007b177682573f in nsMessenger::SaveAllAttachments(nsTArray<nsTString<char> > const&, nsTArray<nsTString<char> > const&, nsTArray<nsTString<char> > const&, nsTArray<nsTString<char> > const&, bool)
(this=0x7b176186e190, contentTypeArray=..., urlArray=..., displayNameArray=..., messageUriArray=..., detaching=<optimized out>) at /home/user/moz/commcent/mozilla/comm/mailnews/base/src/nsMessenger.cpp:870
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #1)
That's the caller.
It crashes/asserts here:
https://searchfox.org/comm-central/rev/89c30dfce0f903bcab7e25e9a9f24f39988ef40c/mailnews/base/src/nsMessenger.cpp#1836
The crash is independent of encryption, it also happens in a plaintext message with two small zip attachments.
Assignee | ||
Comment 3•4 years ago
|
||
If you can reproduce, can you attach a suitable testcase as .eml?
Reporter | ||
Comment 4•4 years ago
|
||
open message
click save all attachments
confirm the folder
crash.
(reminder: only with debug enabled)
Assignee | ||
Comment 5•4 years ago
|
||
Ah, it's actually the assertion that is wrong. Operator precedence funkiness... (3 == 3 == 3 == 3) is actually false!
Assignee | ||
Comment 6•4 years ago
|
||
We shouldn't let js pass in junk here.
Comment 7•4 years ago
|
||
Comment on attachment 9152316 [details] [diff] [review] bug1639680_wrong_assert.patch Review of attachment 9152316 [details] [diff] [review]: ----------------------------------------------------------------- I'm beginning to think a lot of our runtime checks would be better off as hard asserts, but yes - patch looks good to me!
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/bbe97f4c2716
fix wrong assertion, ensure nsMessenger::SaveAllAttachments arguments are correct with runtime check instead. r=benc
Assignee | ||
Updated•4 years ago
|
Description
•