Closed Bug 492216 Opened 15 years ago Closed 4 years ago

On layout change, listener for onEndMsgDownload seems gone, so that never runs.

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: alta88, Assigned: darktrojan)

References

Details

(Keywords: regression, Whiteboard: [has regression range])

Attachments

(2 files)

consequently, neither does onMsgParsed, and a number of things don't happen anymore that would as a matter of course after selecting a message without a layout change.  most notably, feed messages are no longer visible.

seems nsMsgStatusFeedback isn't restored.  also, onEndMsgDownload normally runs each time a pop or feed message is selected, but not for imap or nntp.  it may or may not be an oversight that it doesn't for imap.
so regression?
alta88, can you estimate or find the regression range??

is bug 535980 a duplicate, or anything else mention there?
Severity: normal → major
i don't know if the reply based bugs are related.  bug 531397#c6 seems to have done some analysis in addition to what i found here (a long time ago).  in that bug i mention a checkin that broke layouts; that would be 781f622cb9b7 of 2009-06-25.  so i'd guess the issue starts there.  despite trying quite hard to figure out how to fix layouts, since widethread is very important to me, i abandoned it with a fried brain..
In reply to comment #3)
> i don't know if the reply based bugs are related.  bug 531397 comment 6 (standard8 comment) seems to have
> done some analysis in addition to what i found here (a long time ago). 

I put regression range at between 20090501 and 20090502.
fixing this should help bug 531397. 
bug 542213 and others should also be checked.(
Blocks: 531397
Whiteboard: [has regression range]
http://hg.mozilla.org/comm-central/pushloghtml?startdate=2009-05-01+03%3A00&enddate=2009-05-02+05%3A00

I would guess the checkin of Bug 438429 - Meta bug to fix several RSS Summary/Web Page
Interesting.  If I change layout while on the second (3pane) tab, the second tab's message reader still works, but the first (3pane) tab breaks.  This suggests something bad is happening in terms of the msgWindow associated with the first tab...
And I get a this:
WARNING: NS_ENSURE_TRUE(!mIsBeingDestroyed) failed: file /home/visbrero/rev_control/hg/comm-central/mozilla/docshell/base/nsDocShell.cpp, line 7948
The nsMessenger's mDocShell is apparently broken.  The messenger instance gets told that by a call to setWindow.  Each mail tab has their own messenger instance, and each one of those needs to issue a new call to setWindow.

not it!
Jim, you love tabs and folderDisplay, right?  Mayhaps you like this bug?
(In reply to comment #6)
> Interesting.  If I change layout while on the second (3pane) tab, the second
> tab's message reader still works, but the first (3pane) tab breaks.  This
> suggests something bad is happening in terms of the msgWindow associated with
> the first tab...

I hadn't tested in a second tab. But your findings are consistent with the fact that closing 3pane and restarting it "fixes" the problem (and also consistent with reports in other bugs about restarting 3pane, for other types of issues like breakage after replies)

Andrew, Thanks for testing this.
there is bug 636874 for tabs/layout.
No longer blocks: 531397
I also encountered this bug on version 17.0.8, and fixed it myself.
Andrew Sutherland is right, while changing layout, it goes to function UpdateMailPaneConfig in msgMail3PaneWindow.js, notice this line:
  desiredParent.appendChild(messagePaneBoxWrapper);
The browser is picked up and inserted into a new element, which makes the inside DocShell changed. As the nsMsgStatusFeedback is not registered into the new DocShell, when the message finishes loading, OnEndMsgDownload is no longer reached.
How I fixed:
1. nsMsgWindow::GetMessageWindowDocShell in nsMsgWindow.cpp, change "if (docShell)" into "if (true)", which means always get the messagepane's doc shell, insteading return the old one.
2. function UpdateMailPaneConfig in msgMail3PaneWindow.js, add:
   msgWindow.statusFeedback = msgWindow.statusFeedback;
after 
   desiredParent.appendChild(messagePaneBoxWrapper);
which register the nsMsgStatusFeedback into the new doc shell.
windywater: can you attach a patch for that?
Severity: major → normal

Well, it does work. Whether or not it's the right thing to do I'm not really sure, but the tests pass. Who's best for reviewing this?

Flags: needinfo?(mkmelin+mozilla)
Assignee: nobody → geoff
Status: NEW → ASSIGNED

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e75c0826bbee
Prevent 3-pane layout change from breaking messageHeaderSink listeners. r=mkmelin DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Blocks: 1617461
Target Milestone: --- → 81 Branch
Flags: needinfo?(mkmelin+mozilla)

Uplift to 78?

Comment on attachment 9167824 [details]
Bug 492216 - Prevent 3-pane layout change from breaking messageHeaderSink listeners

Ancient bug, no rush, but it's been on beta long enough for problems to surface.

Attachment #9167824 - Flags: approval-comm-esr78?

Comment on attachment 9167824 [details]
Bug 492216 - Prevent 3-pane layout change from breaking messageHeaderSink listeners

[Triage Comment]
Approved for esr78

risks?

Attachment #9167824 - Flags: approval-comm-esr78? → approval-comm-esr78+

ESR78 version of this patch necessary due to NS_STRING_LITERAL changes.

Attachment #9173750 - Flags: feedback?(mkmelin+mozilla)
Attachment #9173750 - Flags: feedback?(mkmelin+mozilla) → feedback+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: