Closed Bug 133861 Opened 22 years ago Closed 22 years ago

Error message or Crash occurs when trying to Reply/Forward a message in a folder containing a comma in its name.

Categories

(MailNews Core :: Composition, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: trix, Assigned: Bienvenu)

References

Details

(Keywords: crash, Whiteboard: [ADT2 RTM] [Needs a=])

Attachments

(2 files)

DESCRIPTION:
If you reply to or forward a message from a folder containing a comma ",", 2
alternatives occur, you either get a message "An error occurred while creating a
message compose window.  Please try again." or Netscape crashes.

NOTE:Although a bug has already been filed describing the same error message
(bug 131384), the steps are completely different, which is why a new bug was
created.

STEPS:
1. Open Mail/News 3-pane window.
2. Create a new folder containing a comma "," (ie., "comma, testing")
3. Create another folder identical in name mentioned above, but without the
comma "," (ie., "comma testing")
4. Copy 1 message to both folders.
5. Now, select the folder "comma, testing", select the message, and attempt to
Reply or Forward that message.

RESULT:
Either you'll receive the error message or Netscape will crash.

NOTE: 
If you try to Reply or Forward the same message found in the folder NOT
containing a comma in the name (ie., "comma testing), it works fine.  This is
duplicatible on all platforms.

Also, if you wish, I've setup a test account on a test server that can duplicate
this problem. Heres the info:

Mail Server Name:     linzilla.mcom.com
Server Type:          IMAP/POP (it doesn't matter)
User Name:            test01
Password:             test01
renaming QA Contact to myself
QA Contact: gayatri → trix
nominating to nsbeta1
Keywords: nsbeta1
Do you have a talkback report for this?
Whiteboard: [need info]
sorry for replying late.  here's the stack trace from Windows trunk build:

nsXPCWrappedJSClass::GetInterfaceName
[d:\builds\seamonkey\mozilla\js\src\xpconnect\src\xpcwrappedjsclass.cpp, line 1587]
nsXPCWrappedJSClass::CallMethod
[d:\builds\seamonkey\mozilla\js\src\xpconnect\src\xpcwrappedjsclass.cpp, line 1242]
nsXPCWrappedJS::CallMethod
[d:\builds\seamonkey\mozilla\js\src\xpconnect\src\xpcwrappedjs.cpp, line 430]
PrepareAndDispatch
[d:\builds\seamonkey\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcstubs.cpp,
line 117]
SharedStub
[d:\builds\seamonkey\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcstubs.cpp,
line 139]
nsMsgComposeService::OpenWindow
[d:\builds\seamonkey\mozilla\mailnews\compose\src\nsMsgComposeService.cpp, line 267]
nsMsgComposeService::OpenComposeWindow
[d:\builds\seamonkey\mozilla\mailnews\compose\src\nsMsgComposeService.cpp, line 457]
XPTC_InvokeByIndex
[d:\builds\seamonkey\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp,
line 106]
XPCWrappedNative::CallMethod
[d:\builds\seamonkey\mozilla\js\src\xpconnect\src\xpcwrappednative.cpp, line 2027]
XPC_WN_CallMethod
[d:\builds\seamonkey\mozilla\js\src\xpconnect\src\xpcwrappednativejsops.cpp,
line 1267]
js_Invoke [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 790]
js_Interpret [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 2746]
js_Invoke [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 806]
js_InternalInvoke [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 881]
JS_CallFunctionValue [d:\builds\seamonkey\mozilla\js\src\jsapi.c, line 3414]
nsJSContext::CallEventHandler
[d:\builds\seamonkey\mozilla\dom\src\base\nsJSEnvironment.cpp, line 1019]
nsJSEventListener::HandleEvent
[d:\builds\seamonkey\mozilla\dom\src\events\nsJSEventListener.cpp, line 182]
nsEventListenerManager::HandleEventSubType
[d:\builds\seamonkey\mozilla\content\events\src\nsEventListenerManager.cpp, line
1218]
nsEventListenerManager::HandleEvent
[d:\builds\seamonkey\mozilla\content\events\src\nsEventListenerManager.cpp, line
2210]
nsXULElement::HandleDOMEvent
[d:\builds\seamonkey\mozilla\content\xul\content\src\nsXULElement.cpp, line 3457]
PresShell::HandleDOMEventWithTarget
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 6137]
nsButtonBoxFrame::MouseClicked
[d:\builds\seamonkey\mozilla\layout\xul\base\src\nsButtonBoxFrame.cpp, line 195]
nsButtonBoxFrame::HandleEvent
[d:\builds\seamonkey\mozilla\layout\xul\base\src\nsButtonBoxFrame.cpp, line 142]
PresShell::HandleEventInternal
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 6106]
PresShell::HandleEventWithTarget
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 6057]
nsEventStateManager::CheckForAndDispatchClick
[d:\builds\seamonkey\mozilla\content\events\src\nsEventStateManager.cpp, line 2615]
nsEventStateManager::PostHandleEvent
[d:\builds\seamonkey\mozilla\content\events\src\nsEventStateManager.cpp, line 1698]
PresShell::HandleEventInternal
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 6110]
PresShell::HandleEvent
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 6012]
nsViewManager::HandleEvent
[d:\builds\seamonkey\mozilla\view\src\nsViewManager.cpp, line 2064]
nsView::HandleEvent [d:\builds\seamonkey\mozilla\view\src\nsView.cpp, line 306]
nsViewManager::DispatchEvent
[d:\builds\seamonkey\mozilla\view\src\nsViewManager.cpp, line 1875]
HandleEvent [d:\builds\seamonkey\mozilla\view\src\nsView.cpp, line 83]
nsWindow::DispatchEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 869]
nsWindow::DispatchWindowEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 886]
nsWindow::DispatchMouseEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 4713]
ChildWindow::DispatchMouseEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 4963]
nsWindow::ProcessMessage
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 3630]
nsWindow::WindowProc
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 1131]
USER32.dll + 0x3a5f (0x77d43a5f)
USER32.dll + 0x3b2e (0x77d43b2e)
USER32.dll + 0x3d6a (0x77d43d6a)
USER32.dll + 0x41fd (0x77d441fd)
nsAppShellService::Run
[d:\builds\seamonkey\mozilla\xpfe\appshell\src\nsAppShellService.cpp, line 309]
main1 [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp, line 1366]
main [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp, line 1701]
WinMain [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp, line 1719]
WinMainCRTStartup()
kernel32.dll + 0x1eb69 (0x77e7eb69) 


here's the stack trace from Mac trunk build:

XPConnect.shlb + 0x448c0 (0x3e07c700)
XPConnect.shlb + 0x25384 (0x3e05d1c4)
XPConnect.shlb + 0x21420 (0x3e059260)
PrepareAndDispatch() [xptcstubs_mac.cpp, line 234]
CODE.6
MsgCompose.shlb + 0x3b91c (0x3cbd54fc)
MsgCompose.shlb + 0x3c908 (0x3cbd64e8) 


here's the stack trace from linux trunk build:

nsXPCWrappedJSClass::GetInterfaceName()
nsXPCWrappedJSClass::CallMethod()
nsXPCWrappedJS::CallMethod()
PrepareAndDispatch()
nsXPTCStubBase::Stub4()
nsMsgComposeService::OpenWindow()
nsMsgComposeService::OpenComposeWindow()
XPTC_InvokeByIndex()
XPCWrappedNative::CallMethod()
XPC_WN_CallMethod()
js_Invoke()
js_Interpret()
js_Invoke()
js_InternalInvoke()
JS_CallFunctionValue()
nsJSContext::CallEventHandler()
nsJSEventListener::HandleEvent()
nsEventListenerManager::HandleEventSubType()
nsEventListenerManager::HandleEvent()
nsXULElement::HandleDOMEvent()
PresShell::HandleDOMEventWithTarget()
nsButtonBoxFrame::MouseClicked()
nsButtonBoxFrame::HandleEvent()
PresShell::HandleEventInternal()
PresShell::HandleEventWithTarget()
nsEventStateManager::CheckForAndDispatchClick()
nsEventStateManager::PostHandleEvent()
PresShell::HandleEventInternal()
PresShell::HandleEvent()
nsViewManager::HandleEvent()
nsView::HandleEvent()
nsViewManager::DispatchEvent()
HandleEvent()
nsWidget::DispatchEvent()
nsWidget::DispatchWindowEvent()
nsWidget::DispatchMouseEvent()
nsWidget::OnButtonReleaseSignal()
nsWindow::HandleGDKEvent()
dispatch_superwin_event()
handle_gdk_event()
libgdk-1.2.so.0 + 0x17d7f (0x4035dd7f)
libglib-1.2.so.0 + 0x11773 (0x40390773)
libglib-1.2.so.0 + 0x11d39 (0x40390d39)
libglib-1.2.so.0 + 0x11eec (0x40390eec)
libgtk-1.2.so.0 + 0x94333 (0x402ac333)
nsAppShell::Run()
nsAppShellService::Run()
netscape-bin + 0x84e9 (0x080504e9)
netscape-bin + 0x8cc7 (0x08050cc7)
libc.so.6 + 0x1c507 (0x404d7507) 
forgot to include incident id:

WIN32 incident ID: 4589631
MAC   incident ID: 4741904
LINUX incident ID: 4742752
Discussed at Mail News bug meeting.  Decided to make ADT2 and plus this bug
Keywords: nsbeta1nsbeta1+
Target Milestone: --- → mozilla1.0
Please update this bug with an [adt1] - [adt3] impact rating (or take it off the
list if it doesn't even rate adt3.)  Thanks!
Looks like Michael's prev comments says mail triage want this adt2.  I will make
change so it gets off selmer's radar.
Whiteboard: [need info] → [ADT2]
claeifying summary
Summary: Error message or Crash occurs when trying to Reply/Forward a message. → Error message or Crash occurs when trying to Reply/Forward a message in a folder containing a comma in its name.
*** Bug 109173 has been marked as a duplicate of this bug. ***
In bug 109173, user gave talkback id TB4903860X if its needed.
I can take this - I have what might be a similar bug with exchange servers...
Assignee: mscott → bienvenu
*** Bug 138416 has been marked as a duplicate of this bug. ***
The problem is that nsMsgCompose::CreateMessage is treating the uri as a list of
uri's, separated by commas (perhaps for forwarding multiple messages?), but not
escaping the commas. I'll try to figure out when this broke.
Component: Mail Back End → Composition
yes, as I suspected, that's the problem, and it's a relatively recent change -
rev 1.329 to nsMsgCompose.cpp. So we either need to change the encoding of these
multiple urls by escaping or using a different separater, or change the parsing.
Changing the parsing to look for message:// in between looking for commas is
probably the safest fix - that will handle news,imap, and local...
Severity: normal → major
Keywords: crash
Attached patch proposed fixSplinter Review
this patch makes it instead of just looking for commas, we look for multiple
uri's with "://" and then look for comma's before the second ":://". Uri's
should have colons and/or '/''s escaped so it shouldn't be a problem in the
unlikely case where the folder name contains ://.
Comment on attachment 80636 [details] [diff] [review]
proposed fix

sr=sspitzer

talked with bienvenu over aim, and ideally, we'd be using a string array (from
js, it's easy) instead of using the comma to delimit.

but this would be a bigger, riskier change, especially so close to 1.0 / ns
beta.

instead, he'll log a bug on that issue for ducarroz.
Attachment #80636 - Flags: superreview+
bug 139571 logged for more general fix, including the issue of correctly setting
the replied/forwarded flags when operating on messages in folders with commas in
the name. If JF thinks the general fix would be safer, we could go with it - but
it looks to me like it would be a bigger change.
Comment on attachment 80636 [details] [diff] [review]
proposed fix

R=ducarroz
Attachment #80636 - Flags: review+
fix checked into trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
verified on trunk 2002042510
Status: RESOLVED → VERIFIED
I have reopened bug 138416 (it come back for Mozilla RC2 2002051006), and, higly
probably, this bug should be reopened too.
again, this is only fixed on the trunk, not the mozilla 1.0 branch, from which
rc1 and rc2 were generated. Please do NOT reopen this bug.
*** Bug 143140 has been marked as a duplicate of this bug. ***
Keywords: adt1.0.0
Blocks: 143047
Keywords: approval
Whiteboard: [ADT2] → [ADT2 RTM] [Needs a= & ADT+]
adding adt1.0.0+.  Please get drivers approval and then check into the 1.0 branch.
Keywords: adt1.0.0adt1.0.0+
Whiteboard: [ADT2 RTM] [Needs a= & ADT+] → [ADT2 RTM] [Needs a=]
changing to adt1.0.1+ for checkin to the 1.0 branch.  Please get drivers
approval before checking in.
Keywords: adt1.0.0+adt1.0.1+
Attachment #80636 - Flags: approval+
please checkin to the 1.0.1 branch ASAP. once there please remove the
mozilla1.0.1+ keyword and add the fixed1.0.1 keyword.
Keywords: mozilla1.0.1+
checked into 1.01 branch
*** Bug 148503 has been marked as a duplicate of this bug. ***
verified on branch build 2002061108 changing keyword fixed1.0.1 to verified1.0.1
Product: MailNews → Core
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: