Closed
Bug 286289
Opened 20 years ago
Closed 20 years ago
Compose Window getting closed twice leading to nasty JS errors
Categories
(Thunderbird :: Message Compose Window, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird1.1
People
(Reporter: mscott, Assigned: Bienvenu)
Details
Attachments
(2 files, 2 obsolete files)
|
1.04 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
|
2.92 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
When sending a message in recent trunk builds I get the following errors in the
console:
CopyListener: SUCCESSFUL ON THE COPY OPERATION!
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'[JavaScript Error: "gMsgCompose has no properties" {file: "chrom
e://messenger/content/messengercompose/MsgComposeCommands.js" line: 156}]' when
calling method: [nsIMsgComposeStateListener::ComposeProcessDone]" nsresult: "0x
80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "<unknown>" d
ata: yes]
************************************************************
nsMsgComposeSendListener: Success on the message copy operation!
ComposeUnload from XUL
WARNING: nsComposerCommandsUpdater::SelectionIsCollapsed - no domSelection, file
c:/build/trees/tbirddbg/mozilla/editor/composer/src/nsComposerCommandsUpdater.c
pp, line 386
###!!! ASSERTION:
XPConnect is being called on a scope without a 'Components' property!
This is pretty much always bad. It usually means that native code is
making a callback to an interface implemented in JavaScript, but the
document where the JS object was created has already been cleared and the
global properties of that document's window are *gone*. Generally this
indicates a problem that should be addressed in the design and use of the
callback code.| Reporter | ||
Comment 1•20 years ago
|
||
It looks like the compose window is getting told to close itself twice. 1) Once when the IMAP url finishes running, ImapFolder::OnCopyCompleted ends up calling the copy service which ends up calling CopyListener::OnStopCopy. 2) The second time happens when the imap mail folder calls ::CopyNextStreamListener. The copy listener still has a valid pointer to the compose send object so we tell it to close again, here's the stack for this case: nsMsgCompose::NotifyStateListeners(nsMsgCompose * const 0x045ba7b8, TStateListenerNotification eComposeProcessDone, unsigned int 0) line 3619 nsMsgComposeSendListener::OnStopCopy(nsMsgComposeSendListener * const 0x053e4050, unsigned int 0) line 2972 nsMsgComposeAndSend::NotifyListenerOnStopCopy(nsMsgComposeAndSend * const 0x034b4b50, unsigned int 0) line 3989 CopyListener::OnStopCopy(CopyListener * const 0x05480180, unsigned int 0) line 155 nsImapMailFolder::CopyNextStreamMessage(nsImapMailFolder * const 0x0313c6f0, int 1, nsISupports * 0x054802c8) line 6045
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird1.1
| Reporter | ||
Comment 2•20 years ago
|
||
Read the last comment for more details. This patch prevents the duplicate call to close the compose window by nulling out the composesendlistener after we've told it we are done copying the first time. So the 2nd call doesn't do anything. It still is not clear to me: 1) why this is just now manifesting itself 2) I wonder if we should be looking at the 2nd call coming from nsImapMailFolder::CopyNextStreamMessage as the place where we fix this instead. It seems wrong that we would call Done on the same copy listener object.
Attachment #177528 -
Flags: superreview?(bienvenu)
| Reporter | ||
Comment 3•20 years ago
|
||
ah David, it looks like Bug #235013 caused this duplicate call. I'll let you decide if you want to fix it with the quick mail compose fix or to look at Bug #235013 in more detail to avoid the duplicate notifications to the same copy object. I suspect we should do the later.
| Assignee | ||
Comment 4•20 years ago
|
||
yes, I'm going to do the latter tomorrow...it could be your fix is fine, and needed for local folder fcc.
Assignee: mscott → bienvenu
Status: ASSIGNED → NEW
| Assignee | ||
Comment 5•20 years ago
|
||
OK, what I should have done in bug 235013 was use the copy service to copy messages, and *not* add the extra OnStopCopy call in nsImapMailFolder. I'll attach a patch later today.
| Assignee | ||
Comment 6•20 years ago
|
||
this should fix it - folder drag drop is broken in general on the trunk, so I need to fix that before verifying that local to imap folder copy still works with this patch.
Attachment #177968 -
Flags: superreview?(mscott)
| Assignee | ||
Comment 7•20 years ago
|
||
OK, copying local folders to imap is working, so I think this patch is OK. I'll attach another patch that allows folder copy across servers (instead of just move)
| Assignee | ||
Comment 8•20 years ago
|
||
this is why I was confused earlier - move was working, but I was trying to force a copy...
Attachment #177987 -
Flags: superreview?(mscott)
| Assignee | ||
Updated•20 years ago
|
Attachment #177968 -
Attachment is obsolete: true
Attachment #177968 -
Flags: superreview?(mscott)
| Assignee | ||
Comment 9•20 years ago
|
||
this patch fixes a couple more issues - folder copy wasn't sending a done notification in some cases, because we had two requests with the same source, one a folder copy and one a message copy. In that case, we need to clear both requests. And I also fixed a ref-counting problem - my bad for using delete this instead of Release(). I did verify that the destructor for nsImapFolderCopyState does get called with these changes...
| Assignee | ||
Updated•20 years ago
|
Attachment #178124 -
Flags: superreview?(mscott)
| Reporter | ||
Updated•20 years ago
|
Attachment #177528 -
Attachment is obsolete: true
Attachment #177528 -
Flags: superreview?(bienvenu)
| Reporter | ||
Comment 10•20 years ago
|
||
Comment on attachment 177987 [details] [diff] [review] allow cross-server folder copy this is the wrong patch I think :)
| Reporter | ||
Updated•20 years ago
|
Attachment #178124 -
Flags: superreview?(mscott) → superreview+
| Assignee | ||
Comment 11•20 years ago
|
||
Comment on attachment 177987 [details] [diff] [review] allow cross-server folder copy no, this is an additional patch, to allow cross-server folder copy, as opposed to cross-server folder move
| Reporter | ||
Updated•20 years ago
|
Attachment #177987 -
Flags: superreview?(mscott) → superreview+
| Assignee | ||
Comment 12•20 years ago
|
||
fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•