Closed Bug 147697 Opened 22 years ago Closed 18 years ago

assertion every time I send mail: generate_encodedwords(), output_carryoverlen must be > 0

Categories

(MailNews Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspitzer, Assigned: smontagu)

References

Details

Attachments

(1 file, 1 obsolete file)

on my trunk build from this morning (5-28-2002)

###!!! ASSERTION: output_carryoverlen must be > 0: 'output_carryoverlen > 0', fi
le c:\builds\tip\mozilla\mailnews\mime\src\comi18n.cpp, line 280
Break: at file c:\builds\tip\mozilla\mailnews\mime\src\comi18n.cpp, line 280

NTDLL! 77f9f9df()
nsDebug::Assertion(const char * 0x039fcd14, const char * 0x039fccfc, const char 
* 0x039fccc8, int 280) line 274 + 13 bytes
generate_encodedwords(char * 0x05087af0, const char * 0x07f02460, char 81, char 
* 0x04d3bb58, int 312, int 0, int 72, int 1) line 280 + 32 bytes
apply_rfc2047_encoding(const char * 0x072ae390, int 1, const char * 0x07f02460, 
int 0, int 72) line 703 + 42 bytes
MIME_EncodeMimePartIIStr(const char * 0x072ae390, int 1, const char * 
0x07f02460, const int 0, const int 72) line 1146 + 25 bytes
nsMimeConverter::EncodeMimePartIIStr_UTF8(nsMimeConverter * const 0x016e7220, 
const char * 0x072ae390, int 1, const char * 0x07f02460, int 0, const int 72, 
char * * 0x0012ae68) line 159 + 25 bytes
nsMsgI18NEncodeMimePartIIStr(const char * 0x072ae390, int 1, const char * 
0x07f02460, int 0, int 1) line 411 + 54 bytes
nsMsgComposeAndSend::DeliverFileAsMail(nsMsgComposeAndSend * const 0x050875d8) 
line 3212 + 39 bytes
nsMsgComposeAndSend::DeliverMessage(nsMsgComposeAndSend * const 0x050875d8) 
line 3112 + 15 bytes
nsMsgComposeAndSend::GatherMimeAttachments(nsMsgComposeAndSend * const 
0x050875d8) line 1120 + 15 bytes
nsMsgComposeAndSend::HackAttachments(const nsMsgAttachmentData * 0x00000000, 
const nsMsgAttachedFile * 0x00000000) line 2615 + 12 bytes
nsMsgComposeAndSend::Init(nsIMsgIdentity * 0x0502edd0, nsMsgCompFields * 
0x06fab6d0, nsFileSpec * 0x00000000, int 0, int 0, int 0, nsIMsgDBHdr * 
0x00000000, const char * 0x03aa62bc, const char * 0x00000000, unsigned int 0, 
const nsMsgAttachmentData * 0x00000000, const nsMsgAttachedFile * 0x00000000, 
const char * 0x100e3d34 gCommonEmptyBuffer) line 2992 + 16 bytes
nsMsgComposeAndSend::CreateAndSendMessage(nsMsgComposeAndSend * const 
0x050875d8, nsIEditorShell * 0x06e09c80, nsIMsgIdentity * 0x0502edd0, 
nsIMsgCompFields * 0x06fab6d0, int 0, int 0, int 0, nsIMsgDBHdr * 0x00000000, 
const char * 0x03aa62bc, const char * 0x00000000, unsigned int 0, const 
nsMsgAttachmentData * 0x00000000, const nsMsgAttachedFile * 0x00000000, void 
* ...) line 3801 
nsMsgCompose::_SendMsg(int 0, nsIMsgIdentity * 0x0502edd0, int 0) line 905 + 
225 bytes
nsMsgCompose::SendMsg(nsMsgCompose * const 0x07108e08, int 0, nsIMsgIdentity * 
0x0502edd0, nsIMsgProgress * 0x050205f8) line 1015 + 20 bytes
XPTC_InvokeByIndex(nsISupports * 0x07108e08, unsigned int 7, unsigned int 3, 
nsXPTCVariant * 0x0012bac0) line 106
XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode 
CALL_METHOD) line 1994 + 42 bytes
XPC_WN_CallMethod(JSContext * 0x067542d8, JSObject * 0x06e23e98, unsigned int 
3, long * 0x07297218, long * 0x0012bd9c) line 1266 + 14 bytes
js_Invoke(JSContext * 0x067542d8, unsigned int 3, unsigned int 0) line 788 + 23 
bytes
js_Interpret(JSContext * 0x067542d8, long * 0x0012cbdc) line 2743 + 15 bytes
js_Invoke(JSContext * 0x067542d8, unsigned int 1, unsigned int 2) line 805 + 13 
bytes
nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJSClass * const 0x0427d358, 
nsXPCWrappedJS * 0x06d86d58, unsigned short 5, const nsXPTMethodInfo * 
0x016ac608, nsXPTCMiniVariant * 0x0012d124) line 1193 + 22 bytes
nsXPCWrappedJS::CallMethod(nsXPCWrappedJS * const 0x06d86d58, unsigned short 5, 
const nsXPTMethodInfo * 0x016ac608, nsXPTCMiniVariant * 0x0012d124) line 430
PrepareAndDispatch(nsXPTCStubBase * 0x06d86d58, unsigned int 5, unsigned int * 
0x0012d1d4, unsigned int * 0x0012d1c4) line 115 + 31 bytes
SharedStub() line 139
XPTC_InvokeByIndex(nsISupports * 0x06d86d58, unsigned int 5, unsigned int 1, 
nsXPTCVariant * 0x0012d374) line 106
XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode 
CALL_METHOD) line 1994 + 42 bytes
XPC_WN_CallMethod(JSContext * 0x067542d8, JSObject * 0x08750fa0, unsigned int 
1, long * 0x072970a4, long * 0x0012d650) line 1266 + 14 bytes
js_Invoke(JSContext * 0x067542d8, unsigned int 1, unsigned int 0) line 788 + 23 
bytes
js_Interpret(JSContext * 0x067542d8, long * 0x0012e490) line 2743 + 15 bytes
js_Invoke(JSContext * 0x067542d8, unsigned int 1, unsigned int 2) line 805 + 13 
bytes
js_InternalInvoke(JSContext * 0x067542d8, JSObject * 0x087503a0, long 
141886384, unsigned int 0, unsigned int 1, long * 0x0012e6e8, long * 
0x0012e5b8) line 880 + 20 bytes
JS_CallFunctionValue(JSContext * 0x067542d8, JSObject * 0x087503a0, long 
141886384, unsigned int 1, long * 0x0012e6e8, long * 0x0012e5b8) line 3424 + 31 
bytes
nsJSContext::CallEventHandler(nsJSContext * const 0x0694f558, void * 
0x087503a0, void * 0x087503b0, unsigned int 1, void * 0x0012e6e8, int * 
0x0012e6ec, int 0) line 1042 + 33 bytes
nsJSEventListener::HandleEvent(nsJSEventListener * const 0x015b8a70, 
nsIDOMEvent * 0x0501df88) line 182 + 77 bytes
nsEventListenerManager::HandleEventSubType(nsListenerStruct * 0x06ac7870, 
nsIDOMEvent * 0x0501df88, nsIDOMEventTarget * 0x015b89a8, unsigned int 8, 
unsigned int 7) line 1221 + 20 bytes
nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x015b8a08, 
nsIPresContext * 0x05272308, nsEvent * 0x0012f204, nsIDOMEvent * * 0x0012f0b8, 
nsIDOMEventTarget * 0x015b89a8, unsigned int 7, nsEventStatus * 0x0012f24c) 
line 2218 + 36 bytes
nsXULElement::HandleDOMEvent(nsXULElement * const 0x015b89a0, nsIPresContext * 
0x05272308, nsEvent * 0x0012f204, nsIDOMEvent * * 0x0012f0b8, unsigned int 1, 
nsEventStatus * 0x0012f24c) line 3447
PresShell::HandleDOMEventWithTarget(PresShell * const 0x066ae290, nsIContent * 
0x015b89a0, nsEvent * 0x0012f204, nsEventStatus * 0x0012f24c) line 6168 + 36 
bytes
nsButtonBoxFrame::MouseClicked(nsIPresContext * 0x05272308, nsGUIEvent * 
0x0012f3f8) line 192
nsButtonBoxFrame::HandleEvent(nsButtonBoxFrame * const 0x06bf2878, 
nsIPresContext * 0x05272308, nsGUIEvent * 0x0012f3f8, nsEventStatus * 
0x0012f6d8) line 142
PresShell::HandleEventInternal(nsEvent * 0x0012f3f8, nsIView * 0x00000000, 
unsigned int 1, nsEventStatus * 0x0012f6d8) line 6136 + 38 bytes
PresShell::HandleEventWithTarget(PresShell * const 0x066ae290, nsEvent * 
0x0012f3f8, nsIFrame * 0x06bf2878, nsIContent * 0x06a534b8, unsigned int 1, 
nsEventStatus * 0x0012f6d8) line 6090 + 22 bytes
nsEventStateManager::CheckForAndDispatchClick(nsEventStateManager * const 
0x06cd7398, nsIPresContext * 0x05272308, nsMouseEvent * 0x0012f8cc, 
nsEventStatus * 0x0012f6d8) line 2641 + 63 bytes
nsEventStateManager::PostHandleEvent(nsEventStateManager * const 0x06cd73a0, 
nsIPresContext * 0x05272308, nsEvent * 0x0012f8cc, nsIFrame * 0x06bf2878, 
nsEventStatus * 0x0012f6d8, nsIView * 0x0690d520) line 1727 + 28 bytes
PresShell::HandleEventInternal(nsEvent * 0x0012f8cc, nsIView * 0x0690d520, 
unsigned int 1, nsEventStatus * 0x0012f6d8) line 6141 + 43 bytes
PresShell::HandleEvent(PresShell * const 0x066ae294, nsIView * 0x0690d520, 
nsGUIEvent * 0x0012f8cc, nsEventStatus * 0x0012f6d8, int 1, int & 1) line 6044 
+ 25 bytes
nsViewManager::HandleEvent(nsView * 0x0690d520, nsGUIEvent * 0x0012f8cc, int 1) 
line 2076
nsView::HandleEvent(nsViewManager * 0x06a9e558, nsGUIEvent * 0x0012f8cc, int 1) 
line 306
nsViewManager::DispatchEvent(nsViewManager * const 0x06a9e558, nsGUIEvent * 
0x0012f8cc, nsEventStatus * 0x0012f7c8) line 1881 + 23 bytes
HandleEvent(nsGUIEvent * 0x0012f8cc) line 83
nsWindow::DispatchEvent(nsWindow * const 0x0693c10c, nsGUIEvent * 0x0012f8cc, 
nsEventStatus & nsEventStatus_eIgnore) line 969 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012f8cc) line 990
nsWindow::DispatchMouseEvent(unsigned int 301, unsigned int 0, nsPoint * 
0x00000000) line 4834 + 21 bytes
ChildWindow::DispatchMouseEvent(unsigned int 301, unsigned int 0, nsPoint * 
0x00000000) line 5091
nsWindow::ProcessMessage(unsigned int 514, unsigned int 0, long 2621557, long * 
0x0012fcec) line 3704 + 28 bytes
nsWindow::WindowProc(HWND__ * 0x000c01a8, unsigned int 514, unsigned int 0, 
long 2621557) line 1234 + 27 bytes
USER32! 77e13eb0()
USER32! 77e1401a()
USER32! 77e192da()
nsAppShellService::Run(nsAppShellService * const 0x04043158) line 451
main1(int 2, char * * 0x00304b90, nsISupports * 0x00000000) line 1456 + 32 bytes
main(int 2, char * * 0x00304b90) line 1805 + 37 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e87903(
cc to taka
Taka, can you try this on your build?
I can reproduce this with ASCII string like "Naoki Hotta <nhotta@netscape.com>".

QA contact to Marina. Thanks.
Keywords: intl
QA Contact: ji → marina
This is caused by nsMsgComposeAndSend::DeliverFileAsMail().  It calls
nsMsgI18NEncodeMimePartIIStr() which eventually calls generate_encodedwords() in
comi18n.cpp.

Having said that, it doesn't have to call MIME encoder to talk to SMTP server in
the first place.  Instead, it should extract add-spec only and give them to SMTP
server.
Not an i18n issue.  Remove intl keyword.  Component should be changed, too.
Keywords: intl
FYI.  You can apply following patch to get rid of the assertion for now.
Official patch will follow later.


Index: nsMsgSend.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgSend.cpp,v
retrieving revision 1.307
diff -u -r1.307 nsMsgSend.cpp
--- nsMsgSend.cpp 14 Jun 2002 18:07:01 -0000 1.307
+++ nsMsgSend.cpp 26 Jun 2002 21:52:43 -0000
@@ -3258,7 +3258,7 @@

// Ok, now MIME II encode this to prevent 8bit problems...
char *convbuf = nsMsgI18NEncodeMimePartIIStr(buf, PR_TRUE,
- mCompFields->GetCharacterSet(), 0, nsMsgMIMEGetConformToStandard());
+ mCompFields->GetCharacterSet(), 1, nsMsgMIMEGetConformToStandard());
if (convbuf)
{
// MIME-PartII conversion

would be better to remove the assert I added a while ago in generate_encodedwords
Comment out the assertion for now and fix nsMsgSend.cpp later.
Status: NEW → ASSIGNED
Jean-Francois, Seth, could you r/sr?
Comment on attachment 89617 [details] [diff] [review]
Comment out the assertsion which checkes the header field length for MIME encoding.

R=ducarroz
Attachment #89617 - Flags: review+
despite the assertion, the function correctly manages the case where the field
output_carryoverlen is 0.
Target Milestone: --- → mozilla1.2alpha
Target Milestone: mozilla1.2alpha → ---
Product: MailNews → Core
I am still getting this debug text with mozilla-source-2005110105-trunk on linux when sending away an email message. Maybe it is related to the small window showing mozilla is connecting to the SMTP server and showing the progress bar?
Maybe consider as the followup of the bug #75649? I get the message when the message tagged as to be in iso-8859-2 or even 8859-1 charsets (in both cases, I used only us-ascii chars in the message ... well, the From: line contains one 8859-2 char, true :().


SendMessage from XUL
GenericSendMessage from XUL
Identity = [nsIMsgIdentity: id3]
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: default.xpm not found, file nsWindow.cpp, line 3093
++WEBSHELL 0xa711b88 == 10
++DOMWINDOW == 24
###!!! ASSERTION: output_carryoverlen must be > 0: 'output_carryoverlen > 0', file comi18n.cpp, line 194
Break: at file comi18n.cpp, line 194
++DOMWINDOW == 25
Trying to position a sizeless window; caller should have called sizeToContent() or sizeTo(). See bug 75649.

Message Delivery SUCCEEDED!
nsMsgComposeSendListener: Success on the message send operation!
CopyListener::OnStartCopy()
nsMsgComposeSendListener::OnStartCopy()
CopyListener: SUCCESSFUL ON THE COPY OPERATION!
--WEBSHELL 0xa711b88 == 9
nsMsgComposeSendListener: Success on the message copy operation!
WARNING: NS_ENSURE_TRUE(nsDoc) failed, file nsXULElement.cpp, line 2299

THE CLEANUP ROUTINE FOR nsMsgComposeAndSend() WAS CALLED
Blocks: 266755
Assignee: nhottanscp → smontagu
Status: ASSIGNED → NEW
QA Contact: marina → mailnews.i18n
Attached patch Updated patchSplinter Review
If the assertion is unnecessary, I'd rather just remove it than comment it out.
Attachment #89617 - Attachment is obsolete: true
Attachment #242385 - Flags: superreview?
Attachment #242385 - Flags: superreview? → superreview?(sspitzer)
Comment on attachment 242385 [details] [diff] [review]
Updated patch

simon, I'm going to send the sr to david.
Attachment #242385 - Flags: superreview?(sspitzer) → superreview?(bienvenu)
Attachment #242385 - Flags: superreview?(bienvenu) → superreview+
Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: