Closed Bug 278511 Opened 20 years ago Closed 20 years ago

Displaying some emails results in ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mmokrejs, Assigned: mrbkap)

Details

Attachments

(4 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050115 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050115 Deleting an email in current Inbox folder using 'delete' button gives me. Once I get binary with all debug symbols, I'll post a stracktrace. It's in cvs some weeks at least. Still happens with todays cvs. Begin mail message delivery. Abort mail message delivery. Begin mail message delivery. Abort mail message delivery. WARNING: nsMsgProtocol::SetContentCharset() not implemented, file nsMsgProtocol.cpp, line 596 WARNING: GetDefaultCharsetForLocale: need to add multi locale support, file nsUNIXCharset.cpp, line 189 mailCharsetLoadListener: ISO-8859-2 WARNING: GetDefaultCharsetForLocale: need to add multi locale support, file nsUNIXCharset.cpp, line 189 mailCharsetLoadListener: ISO-8859-1 WARNING: GetDefaultCharsetForLocale: need to add multi locale support, file nsUNIXCharset.cpp, line 189 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 Reproducible: Always
No, it happens actually when an email is selected in the list and therefore displayed in the lower-right window. Will attach one such email.
Attached file testcase
Here's the stack trace - it happens to me on messages that contain quoted replies. It started with some checkin around the 1.8a6 timeframe (I think just after, but I'm not sure) nsDependentSubstring::Rebind(const unsigned short * 0x00000000, const unsigned short * 0x00000000) line 76 + 34 bytes nsScannerSubstring::AsString() line 249 CCommentToken::GetStringValue() line 1512 nsCParserNode::GetText() line 160 + 17 bytes SinkContext::AddComment(const nsIParserNode & {...}) line 1595 + 11 bytes HTMLContentSink::AddComment(HTMLContentSink * const 0x0464b078, const nsIParserNode & {...}) line 3195 + 18 bytes CNavDTD::HandleCommentToken(CToken * 0x12269600) line 2117 + 34 bytes CNavDTD::HandleToken(CNavDTD * const 0x123a2be0, CToken * 0x12269600, nsIParser * 0x043abc48) line 906 + 12 bytes CNavDTD::BuildModel(CNavDTD * const 0x123a2be0, nsIParser * 0x043abc48, nsITokenizer * 0x04f8a410, nsITokenObserver * 0x00000000, nsIContentSink * 0x0464b078) line 455 + 20 bytes nsParser::BuildModel(nsParser * const 0x043abc48) line 2023 + 34 bytes nsParser::ResumeParse(int 0x00000001, int 0x00000000, int 0x00000001) line 1890 + 12 bytes nsParser::OnDataAvailable(nsParser * const 0x043abc4c, nsIRequest * 0x12134004, nsISupports * 0x11fe1624, nsIInputStream * 0x1207a3e0, unsigned int 0x00000000, unsigned int 0x000006d9) line 2568 + 21 bytes nsDocumentOpenInfo::OnDataAvailable(nsDocumentOpenInfo * const 0x1209a488, nsIRequest * 0x12134004, nsISupports * 0x11fe1624, nsIInputStream * 0x1207a3e0, unsigned int 0x00000000, unsigned int 0x000006d9) line 348 + 46 bytes
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Deleting an email in folder results in ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 → Displaying some emails results in ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76
Attached patch patch v1Splinter Review
I can't say for certain that this patch fixes this bug (could someone test it?), but this is the only case where we could return NS_OK with an unbound mComment. Note: we assert in the case: <!>, does that appear in the generated message source?
Assignee: mscott → mrbkap
Status: NEW → ASSIGNED
Attachment #171421 - Flags: review?(bzbarsky)
Comment on attachment 171421 [details] [diff] [review] patch v1 r+sr=bzbarsky
Attachment #171421 - Flags: superreview+
Attachment #171421 - Flags: review?(bzbarsky)
Attachment #171421 - Flags: review+
Tha patch doesn't help me. Another testcase will follow. ###!!! ASSERTION: nsTDependentSubstring must wrap a non-NULL buffer: 'start && end', file nsTDependentSubstring.cpp, line 76 Break: at file nsTDependentSubstring.cpp, line 76 mailCharsetLoadListener: ISO-8859-2 WARNING: NS_ENSURE_TRUE(nsDoc) failed, file nsXULElement.cpp, line 2557
Attached file another testcase
Attached patch patch v2Splinter Review
Whoops, I was blind when I made that first patch. This code was apparently written with the assumption that aScanner.BindSubstring(string, aPos, aPos) was a bad thing. We now enforce that mComment has been bound to something, so those BindSubstring calls need to happen. Martin, would you try this patch and see if it fixes things?
Yes, patch v2 has helped! Thanks!
Attachment #171434 - Flags: review?(bzbarsky)
Comment on attachment 171434 [details] [diff] [review] patch v2 Looks good.
Attachment #171434 - Flags: superreview+
Attachment #171434 - Flags: review?(bzbarsky)
Attachment #171434 - Flags: review+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: