Closed
Bug 117791
Opened 23 years ago
Closed 23 years ago
crash when using insert symbol/character.
Categories
(SeaMonkey :: Composer, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: ssaux, Assigned: cmanske)
Details
(Keywords: crash)
Attachments
(1 file, 3 obsolete files)
2.60 KB,
patch
|
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
build ID 2002010103. To reproduce: Compose email. insert->symbol/character. This opens a new utility window. Send email. compose new email. Attempt to use the previously opened insert char/symbol window. Crash. The insert window is probably tied to the mail compose window that opened it. Sending the email leaves the pointer dangling.
Reporter | ||
Comment 2•23 years ago
|
||
Actually I tried the editor, and closing an editor window that opened an insert char/symbol window causes the latter to close.
Comment 3•23 years ago
|
||
Here is the stack trace: nsEditor::BeginUpdateViewBatch [d:\builds\seamonkey\mozilla\editor\libeditor\base\nsEditor.cpp, line 4338] nsEditor::BeginPlaceHolderTransaction [d:\builds\seamonkey\mozilla\editor\libeditor\base\nsEditor.cpp, line 691] nsAutoPlaceHolderBatch::nsAutoPlaceHolderBatch [..\base\nsEditorUtils.h] nsHTMLEditor::InsertHTMLWithCharsetAndContext [d:\builds\seamonkey\mozilla\editor\libeditor\html\nsHTMLDataTransfer.cpp, line 304] nsHTMLEditor::InsertHTMLWithCharset [d:\builds\seamonkey\mozilla\editor\libeditor\html\nsHTMLDataTransfer.cpp, line 275] nsHTMLEditor::InsertHTML [d:\builds\seamonkey\mozilla\editor\libeditor\html\nsHTMLDataTransfer.cpp, line 263] nsEditorShell::InsertSource [d:\builds\seamonkey\mozilla\editor\composer\src\nsEditorShell.cpp, line 2317] 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 2011] 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 834] js_Interpret [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 2799] js_Invoke [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 850] js_InternalInvoke [d:\builds\seamonkey\mozilla\js\src\jsinterp.c, line 925] JS_CallFunctionValue [d:\builds\seamonkey\mozilla\js\src\jsapi.c, line 3407] nsJSContext::CallEventHandler [d:\builds\seamonkey\mozilla\dom\src\base\nsJSEnvironment.cpp, line 1014] GlobalWindowImpl::RunTimeout [d:\builds\seamonkey\mozilla\dom\src\base\nsGlobalWindow.cpp, line 3844] GlobalWindowImpl::TimerCallback [d:\builds\seamonkey\mozilla\dom\src\base\nsGlobalWindow.cpp, line 4152] nsTimerImpl::Process [d:\builds\seamonkey\mozilla\xpcom\threads\nsTimerImpl.cpp, line 242] handleMyEvent [d:\builds\seamonkey\mozilla\xpcom\threads\nsTimerImpl.cpp, line 279] PL_HandleEvent [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c, line 591] PL_ProcessPendingEvents [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c, line 524] _md_EventReceiverProc [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c, line 1072] nsAppShellService::Run [d:\builds\seamonkey\mozilla\xpfe\appshell\src\nsAppShellService.cpp, line 303] netscp6.exe + 0x167d (0x0040167d) netscp6.exe + 0x121c (0x0040121c) netscp6.exe + 0x3221 (0x00403221) KERNEL32.DLL + 0x17d08 (0x77e97d08)
Comment 4•23 years ago
|
||
reassign to editor
Assignee: ducarroz → kin
Component: Composition → Editor: Core
Product: MailNews → Browser
QA Contact: sheelar → sujay
Comment 5•23 years ago
|
||
-->cmanske for investigation I bet we don't do the right "magic" for reassigning the window for insert char dialog (as we do for Composer windows)
Assignee: kin → cmanske
Component: Editor: Core → Editor: Composer
Whiteboard: EDITORBASE
Assignee | ||
Comment 6•23 years ago
|
||
Yep, we aren't doing the proper monitoring of the Insert Char dialog when in Mail Composer.
Severity: normal → major
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 7•23 years ago
|
||
This is the most conservative fix: Always close the Insert Character dialog whenever we attempt to close the message Composer window. This will still close the dialog even if window doesn't close, like when user clicks "Cancel" button when prompted to save message. More complicated fixes would be 1. Close the dialog only if result of ComposeCanClose is actually "true", thus window is closing.2. Don't always close dialog, but shift it to another editor window, like we do in main page Composer. We would have to add an OnFocus() handler in mail composer to do what we do in EditorOnFocus() in editor.js. Any opinions on these options?
Assignee | ||
Updated•23 years ago
|
Comment 8•23 years ago
|
||
I'm ok with the patch submitted above (r=brade) but you'll need module owner permission to check it in. JFD or someone else may prefer a different strategy (which would be fine too).
Comment 9•23 years ago
|
||
WHat would append in the case of the user send the message: The msg compose backend will close the window without calling the JS function ComposeCanClose! Also, I am worry in the case we cache the compose window instead of destroying in (when reclycling the msg compose window), we should close the insert char window as well in that case. Maybe a better solution would be for editor to have a "cleanup" function (in C++ or JS) I can call in various point in msg compose.
Assignee | ||
Comment 10•23 years ago
|
||
Supplying a general EditorCleanup() method sounds like a good idea.
Assignee | ||
Comment 11•23 years ago
|
||
With this patch, the InsertCharacter dialog will be closed only if ComposeCanClose() is returning "true" and the messenger window will be closed. I'll let Ducarroz add a patch to include calling EditorCleanup() at other places in the messenger code, as he suggested.
Attachment #66542 -
Attachment is obsolete: true
Whiteboard: EDITORBASE, FIX IN HAND, need r=,sr= → EDITORBASE+, FIX IN HAND, need r=,sr=
Comment 12•23 years ago
|
||
This patch is only for the mailnews side of the fix. I don't think we need to apply the modification cmanske proposed for MsgComposeCommands.js in the previous patch.
Assignee | ||
Comment 13•23 years ago
|
||
This patch contains exactly the changes as in patch 67440, plus: 1. It turns out it is important to include the 'onfocus' handler exactly as done in Web Composer else when you change focus to/from a Message Compose window, the Insert Character dialog will loose it's associated composer. This is done by simply setting onfocus="EditorOnFocus()" in messengercompose.xul 2. EditorCleanup() simply calls SwitchInsertCharToAnotherEditorOrClose() exactly as is done in Web Composer so the behavior is the same. When a mail window is closed, the Insert Character dialog doesn't need to be closed if there's another Composer to take ownership.
Attachment #66805 -
Attachment is obsolete: true
Attachment #67440 -
Attachment is obsolete: true
Assignee | ||
Comment 14•23 years ago
|
||
Comment on attachment 67440 [details] [diff] [review] News patch for MsgComposeCommands.js r=cmanske
Attachment #67440 -
Flags: review+
Comment 15•23 years ago
|
||
Comment on attachment 67528 [details] [diff] [review] Updated patch R=ducarroz for the mailnews part of it.
Comment 16•23 years ago
|
||
Comment on attachment 67528 [details] [diff] [review] Updated patch sr=dveditz
Attachment #67528 -
Flags: superreview+
Comment 17•23 years ago
|
||
r=brade
Whiteboard: EDITORBASE+, FIX IN HAND, need r=,sr= → EDITORBASE+, FIX IN HAND
Assignee | ||
Comment 18•23 years ago
|
||
checked in
Comment 19•23 years ago
|
||
Stephane, does this work for you now?
Reporter | ||
Comment 20•23 years ago
|
||
yes. It works. If I have one complaint is that you can "lose" the insert window: Open a compose window, open the insert char dialog, use it. Close compose window. The insert dialog stays. Bury it behind other windows. Open new compose window. Do insert->char symb. There's no feedback. The window is still buried. It would be best if the focus was given to the insert window.
Comment 21•23 years ago
|
||
marking verified. Stephane, please file a bug for the new issue you brought up...thanks.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•