Closed Bug 300749 Opened 19 years ago Closed 19 years ago

Switching folders doesn't work on 1st try/Click to mail folder displays messages not always [JS error in msgMail3PaneWindow.js::ClearMessagePane]

Categories

(SeaMonkey :: MailNews: Message Display, defect)

1.7 Branch
defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: raoul, Assigned: Bienvenu)

References

Details

(Keywords: fixed1.7.11, regression, Whiteboard: [fixed1.7.11])

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.9) Gecko/20050712
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.9) Gecko/20050712

When I click to folder, I sometimes see content of previously selected folder,
not clicked.

Reproducible: Sometimes

Steps to Reproduce:
1. Pick a folder
2. See it content
3. Pick another folder

Actual Results:  
I see same content (of previous folder)

Expected Results:  
Show content of currently selected folder
*** Bug 300888 has been marked as a duplicate of this bug. ***
Flags: blocking1.7.10?
Confirming with Mozilla 1.7.10 build 2005071607 on WinXP. I have switch twice to
update the folder's view. Last 1.7.9 build 2005071212 works for me. 

I see the following errors in the JS console:

Error: [Exception... "Failure"  nsresult: "0x80004005 (NS_ERROR_FAILURE)" 
location: "JS frame :: chrome://messenger/content/msgMail3PaneWindow.js ::
ClearMessagePane :: line 1099"  data: no]
Source File: chrome://messenger/content/msgMail3PaneWindow.js
Line: 1099

Error: uncaught exception: [Exception... "Failure"  nsresult: "0x80004005
(NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://messenger/content/msgMail3PaneWindow.js :: ClearMessagePane :: line
1099"  data: no]

If I restart and delete before the xul.mfl it works until the next restart of
the app. It is very similiar to Bug 295040.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Windows Server 2003 → Windows XP
Summary: Click to mail folder displays messages not always → Switching folders doesn't work on 1st try/Click to mail folder displays messages not always [JS error in msgMail3PaneWindow.js::ClearMessagePane]
(In reply to comment #2)
> Confirming with Mozilla 1.7.10 build 2005071607 on WinXP. I have switch twice to
> update the folder's view. Last 1.7.9 build 2005071212 works for me. 

Sorry, I believe the last version I used was build 2005070707. Other two reports
say 20050712 is broken.

checkins on 1.7 branch during the smallest known timeframe
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=MOZILLA_1_7_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-07-07+07%3A00&maxdate=2005-07-13+00%3A00&cvsroot=%2Fcvsroot
ccing people who checked in in there...
David, Scott, could you take a look at this?  Have we gotten any reports of this
in Thunderbird 1.0.6 builds as well?
Assignee: mail → bienvenu
Flags: blocking1.7.10? → blocking1.7.10-
I can't reproduce this with the 106 candidate on OS X. Possibly Windows-only, or
just difficult to reproduce. 
Flags: blocking1.7.10- → blocking1.7.10?
my current 1.7.x debug build doesn't show this problem. I'm doing a repull and
build to see if it starts happening.
If you switch back and forth does that get it to sync back up again?  Do you
have lots of junk mail or other kind of filtering going on when it doesn't sync?
Reporter: Are you using POP or IMAP?
that's odd. Bugzilla seems to have decided that I changed this from
blocking1.7.10- to blocking1.7.10?. I had mid-aired and I think Bugzilla handled
that incorrectly (I'll file a bug on that later). Leaving it as a ? for now
since we actually do want to look at it a little more, but know that I wasn't
trying to change it at all. 
Which 3-pane layout do you use?  Do you have a start page in mail?
My settings: 
POP3 Account, Local folder account. All received mails are filtered into the
local folders. Junk mail controls are active, but I don't receive spam usually.
I use the 3-pane layout where the full buttom pane is used for preview (upper
pane is divided for folder and message pane). The problem is for almost every
folder change. You have always switch and back and again to get the new folder
content (i.e. update of the message pane and preview pane).
Forgot: I do not have a start page.
I can not reproduce this with Mozilla 1.7.10 2005-07-19-09-1.7 --- Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050719  I'm using the
default folders for an POP or IMAP account plus one user created subfolder in my
inbox for each.  Switching from one folder to the other displays the selected
folder contents as expected.

ostgote, please try reproducing it running Mozilla with a new profile.
I can't get this to happen. I've seen it before, but I can't reproduce it now.
I did some testing: With my original profile and configuration I can reproduce
it with 2005071208 and later but not with 2005071007 and before. 
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=MOZILLA_1_7_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-07-10+07%3A00&maxdate=2005-07-12+08%3A00&cvsroot=%2Fcvsroot
The latest build I tested and which fails is 2005071808. 

But I cannot reproduce it with a plain new profile, classic theme and standard
POP3 account without any filters. Even if I tried to rebuild the filter
structure (move all incoming to a self-created Inbox folder on Local folders
account, all drafts/sent/template to local too) I cannot reproduce with that
profile.

So it is interesting to know the configuration from the two other reporters
<raoul@elforsoft.com> and <xsaarkphantom@gmail.com>. Please say us your
configuration (POP or IMAP, pane view, filters, accounts).

Steps to reproduce for my original config/profile:
You have start Mozilla at least two times (to have a xul.mfl). It affects only
folders which have "changed" (received mail, sent mail, moved or deleted mail).
Variant 1: Open Mailnews, go to say inbox (all Local Folders account), delete
one or two messages, try to switch to trash, bingo! No update, js exception.
Variant 2: Open Mailnews, go to Sent folder, open a message and forward it.
Close opened msg and try to switch to e.g. Inbox. Bingo. For both examples:
Switching between folders which are "unaffected" works as expected.

Hope this helps.
*** Bug 301376 has been marked as a duplicate of this bug. ***
It affects also IMAP, see last dupe bug 301376.
This looks an awful lot like a dupe of Bug 295040

which was addressing a regression caused by Bug 281988, "Stop sharing DOM object
wrappers between content and chrome"

Any chance 281988 was checked into the mozilla 1.7.9 release for some reason
without checking in 295040 onto the same branch?

(In reply to comment #19)
> Any chance 281988 was checked into the mozilla 1.7.9 release for some reason
> without checking in 295040 onto the same branch?

295040 isn't on the branch so that's not it. Maybe another security bug fix is
making window.location = about:blank fail.

See https://bugzilla.mozilla.org/show_bug.cgi?id=295040#c16 for an explanation
on what was causing ClearMessagePane to throw a similar error for Bug 295040 on
the trunk.

I have a 3-pane layout, my primary and secondary account are an IMAP servers
(primary is an Exchange 2000, secondary is a Lotus Domino via IMAP/SSL),
tertiary is a POP3 server. I don't use a start page. I use a Modern theme.

My mail filters transfer some messages to Local Folders.

The problem persists in all folders: both IMAP, POP3 and Local.

JavaScript console shows:
Error: uncaught exception: [Exception... "Failure"  nsresult: "0x80004005
(NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://messenger/content/msgMail3PaneWindow.js :: ClearMessagePane :: line
1099"  data: no]

Yet another intimate bug (should I fill a new bug for it?): even if folder click
acts normally, the Subject field in preview pane doesn't change when I navigate
from one letter to another.


Yet some errors I get from JS console:
-----
Error: [Exception... "Component returned failure code: 0x80004003
(NS_ERROR_INVALID_POINTER) [nsIMsgMailNewsUrl.mimeHeaders]"  nsresult:
"0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame ::
chrome://messenger/content/mailWindowOverlay.js :: HandleMDNResponse :: line
2112"  data: no]
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 2112
-----
Security Error: Content at
mailbox:///E|/Mozilla/Raoul/XXXXXXXX.slt/Mail/Local%20Folders/Bugzilla?number=305636
may not load or link to chrome://messenger/content/msgMail3PaneWindow.js.
-----
Error: uncaught exception: Load of
chrome://messenger/content/msgMail3PaneWindow.js denied.
Hello

I had the same 3-pane layout. I experienced this behavior every time the focus
was in one of the right panes (mail list or preview) and I tried to switch the
folder. Sometimes I noticed that the current mail in the preview pane didn't
change when the folder was changed.

I used an old profile that goes back to version 1.7.0 (maybe earlier).

When I open the email client it goes automatically to inbox in the first account.
I have one POP3, and two POP3 secure.

I use message filters, no junk mail controls. The email is sorted by thread.

I hope this helps.


(In reply to comment #16)
> I did some testing: With my original profile and configuration I can reproduce
> it with 2005071208 and later but not with 2005071007 and before. 
>
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=MOZILLA_1_7_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-07-10+07%3A00&maxdate=2005-07-12+08%3A00&cvsroot=%2Fcvsroot
> The latest build I tested and which fails is 2005071808. 
> 
> But I cannot reproduce it with a plain new profile, classic theme and standard
> POP3 account without any filters. Even if I tried to rebuild the filter
> structure (move all incoming to a self-created Inbox folder on Local folders
> account, all drafts/sent/template to local too) I cannot reproduce with that
> profile.
> 
> So it is interesting to know the configuration from the two other reporters
> <raoul@elforsoft.com> and <xsaarkphantom@gmail.com>. Please say us your
> configuration (POP or IMAP, pane view, filters, accounts).
> 
> Steps to reproduce for my original config/profile:
> You have start Mozilla at least two times (to have a xul.mfl). It affects only
> folders which have "changed" (received mail, sent mail, moved or deleted mail).
> Variant 1: Open Mailnews, go to say inbox (all Local Folders account), delete
> one or two messages, try to switch to trash, bingo! No update, js exception.
> Variant 2: Open Mailnews, go to Sent folder, open a message and forward it.
> Close opened msg and try to switch to e.g. Inbox. Bingo. For both examples:
> Switching between folders which are "unaffected" works as expected.
> 
> Hope this helps.

Dear Sirs and Madams!

There is a russian proverb "cut without knife". Today 1.7.10 release has this
bug too.

I'm an administrator of corporate network and Mozilla (and Mozilla Mail) is our
corporate standard application, which is automatically deploying and updating
via domain GPO.

This bug makes Mozilla Mail a terrible, completely inconvenient application. I
go to vacation on next two weeks and what must I do with this issue? Fall back
to 1.7.8 with it's security holes? Install an Outlook Express?

<censored> <censored> <censored>!!!

You should at least don't publish security advisories and don't release
milestone until blocker bugs like this aren't fixed.

Sorry for emotional message, but I really don't know how to calm my users.
Severity: major → blocker
I can confirm that problem on Linux with IMAP Folders in an extra account
I can confirm the bug with Linux and IMAP mail account, too.
I upgraded directly from 1.7.8 to 1.7.10 without having used any versions in
between.
I get the same error messages in the JavaScript console as mentioned in comment 2.
I have a large number of accounts (12 to be exact) set up in my profile and I
see this very annoying bug. The strange thing is: everything seems to work fine
as long as I stick with the first three accounts. The problems start immediately
after I move to the fourth account. Newsgroup accounts and Local Folders are
affected as well. That might be the reason why so many can't reproduce the bug.

Playing around with preferences I found out that disabling "Remember the last
selected message" fixes the problem.

Other configuration details: 3-pane layout, IMAP server is the first account,
two news accounts at the end of the list, Forumzilla 0.5.3 is installed (~20
blogs downloaded into separate subfolders in Local Folders).
Comment 16 contains the following link to 2 separate checkins made:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=MOZILLA_1_7_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-07-10+07%3A00&maxdate=2005-07-12+08%3A00&cvsroot=%2Fcvsroot

I tried to back out both checkins.
I identified the culprit is 
  fix 294307 image policies for mail, r=bzbarsky, sr=mscott, a=jay

After backing out this patch it works again.


An additional note how to reproduce the bug, right after starting mozilla
- open mail
- select inbox
- select a message from inbox
- click on another folder
=> message list is not updated


If I back out the change it works again as expected.
Attached patch culprit patch from bug 294307 (obsolete) — Splinter Review
Just for easier testing, this is the checkin that was made.
After reversing this patch folder updating works again for me.
I'll invalidate the patch to make it clear, this is just for informational
purposes, and not a suggestion how to fix the bug.
Attachment #190129 - Attachment is obsolete: true
While I was testing, having the patch reversed, I ran into a crash, this is the
stacktrace. Just FYI.
So is the problem that we're blocking a URI load we should not be blocking?  Are
we missing a mailnews scheme from our whitelist?  What URI is used by the folder
display?
Flags: blocking1.7.11?
(In reply to comment #2)
>Error: [Exception... "Failure"  nsresult: "0x80004005 (NS_ERROR_FAILURE)" 
>location: "JS frame :: chrome://messenger/content/msgMail3PaneWindow.js ::
>ClearMessagePane :: line 1099"  data: no]
>Source File: chrome://messenger/content/msgMail3PaneWindow.js
>Line: 1099
1099         GetMessagePaneFrame().location = "about:blank";
Disabling "Remember the last selected message" doesn't work for me.
folder load runs either a mailbox, imap, or nntp url - I don't think it's going
to be that simple. My guess is that it's the ClearMessagePane that's failing in
some situations, and whatever url that runs.
*** Bug 301732 has been marked as a duplicate of this bug. ***
maybe we just need to allow about: urls...perhaps blocking images is making the
about:blank url fail.
(In reply to comment #28)
You are right, folder switching only fails after selecting some message (the
displayed message changes), it is 100% reproducible now. That's why disabling
"Remember the last selected message" seemed to solve the problem. 
allow about: urls even if we're blocking images.
Attachment #190142 - Flags: review?(bzbarsky)
I tested the patch, it fixes the problem for me!
OS: Windows XP → All
Will there be a new release that includes this fix?
Like Raoul Nakhmanson-Kulish, we use this software in a corporate environment
and we certainly can't rollout with this bug.  Remaining at 1.7.8 for now...

In fact 1.7.10 broke something else which I fortunately could work around.  It
probably is related: We have a custom Mail Start Page.  External stylesheet on
the Mail Start Page is no longer loaded when remote images in mail/news are
disallowed.  (images on the Mail Start Page are not loaded in this case, but
that is bug 168805)
I believe the external style sheet blocking when image blocking is turned on was
on purpose, right, Boris? Do we need to change that?
Comment on attachment 190142 [details] [diff] [review]
proposed fix
[Checkin: See comment 53]

Yeah, this make sense.	And yes, remote stylesheets should be blocked.	Are
they not in Thunderbird?
Attachment #190142 - Flags: review?(bzbarsky) → review+
(In reply to comment #42)
> And yes, remote stylesheets should be blocked. Are
> they not in Thunderbird?

Indeed, remote stylesheets are blocked in Thunderbird. 
Attachment #190142 - Flags: superreview?(mscott)
Comment on attachment 190142 [details] [diff] [review]
proposed fix
[Checkin: See comment 53]

i still argue we're better off not trying to fix this on the branch :)

but this fix looks fine for the regression.
Attachment #190142 - Flags: superreview?(mscott) → superreview+
we don't seem to have a flag for 1.7.11 checkin approval, or I'd request it.
Depends on: 301754
Attachment #190142 - Flags: approval1.7.11?
Is this code used only in the suite?
yes, that's my understanding, only used by the suite.
Flags: blocking1.7.10?
I've built myself updated RPM pakages of 1.7.10 for Fedora Core 3 that contain
just the patch for this bug in addition, to allow me for better testing on my
system. I can't provide builds for other systems, and I don't want to spread
them too much by uploading them to a public place, and I won't be providing any
support for the builds, but if anybody wants my unofficial FC3 RPM packages, let
me know by sending private mail.
*** Bug 301918 has been marked as a duplicate of this bug. ***
Hardware: PC → All
*** Bug 301948 has been marked as a duplicate of this bug. ***
*** Bug 301996 has been marked as a duplicate of this bug. ***
Comment on attachment 190142 [details] [diff] [review]
proposed fix
[Checkin: See comment 53]

Thanks for this fix. Please land as soon as possible.
Attachment #190142 - Flags: approval1.7.11? → approval1.7.11+
Flags: blocking1.7.11? → blocking1.7.11+
fixed on 1.7.x branch
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 302138 has been marked as a duplicate of this bug. ***
(In reply to comment #9)
> Reporter: Are you using POP or IMAP?

For me described behaviour happens with news account. If I press spacebar to go
to next group, highlighting in the folder pane changes, but new message is not
loaded and previous one remains on screen. Sometimes even if I manually select
another news group its list is not loaded properly.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716
Remember last selected message is on
Startup page is off
Can those of you who were experiencing this bug please get today's branch build
from http://mozilla.isc.org/pub/mozilla.org/mozilla/nightly/latest-1.7/ and
verify that this issue is indeed fixed? Thanks.
(In reply to comment #56)
> Can those of you who were experiencing this bug please get today's branch build
> from http://mozilla.isc.org/pub/mozilla.org/mozilla/nightly/latest-1.7/ and
> verify that this issue is indeed fixed? Thanks.

Unlike 2005-07-26-08-1.7 which I checked some hours ago this last version
(Gecko/20050726) seems to have fixed the problem. At least at a first glance I
couldn't reproduce the bug on a windows xp sp2 system.

Thanks a lot!

One more question: When can we expect a new release with this fix?
Confirmed, WFM on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10)
Gecko/20050726
At a first glance WFM.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050726
Windows XP SP2
Yes, awesome - works for me too. Huges thanks - this make the previous version
very annoying to use!

(apologies for the dupe bug I submitted, too, (which you marked within minutes
as a dupe of this one) - but I did search and still somehow didn't find this one.)
Just tried nightly/2005-07-25-21-1.7/mozilla-i686-pc-linux-gnu-gtk2+xft.tar.gz
and the problem appears to be fixed.
Status: RESOLVED → VERIFIED
Thanks for all of your feedback. This fix should be available in a Mozilla
1.7.11 release in the next few days.
Attachment #190142 - Attachment description: proposed fix → proposed fix [Checkin: See comment 53]
Whiteboard: [fixed1.7.11]
*** Bug 302472 has been marked as a duplicate of this bug. ***
*** Bug 302522 has been marked as a duplicate of this bug. ***
(In reply to comment #27)

> Playing around with preferences I found out that disabling "Remember the last
> selected message" fixes the problem.

No. Not on my system (Windows XP SP2, Mozilla release 1.7.10, 1 POP3, 1 News). I
can still reproduce this error always.
*** Bug 302808 has been marked as a duplicate of this bug. ***
Wow, what a mess, I'm glad this was fixed so fast (and also this one: https://
bugzilla.mozilla.org/show_bug.cgi?id=301917 ), these TWO issues made Mail 
completely unusable!  I just reverted to 1.7.8 when I saw that 1.7.11 is out 
now.

I wonder how such TWO bad bugs in the UI could make it through to a release, is 
there no regression testing before doing a release???
*** Bug 303101 has been marked as a duplicate of this bug. ***
*** Bug 301997 has been marked as a duplicate of this bug. ***
Really fixed in 1.7.11 release
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.11) Gecko/20050728

Nice work, thanks!
*** Bug 303979 has been marked as a duplicate of this bug. ***
*** Bug 304773 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.