Closed Bug 32892 Opened 24 years ago Closed 24 years ago

Selecting a message in sub-folder/last folder and collapsing the account freezes the application

Categories

(SeaMonkey :: MailNews: Message Display, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: skasinathan, Assigned: hyatt)

Details

(Keywords: crash, Whiteboard: [PDT-])

steps:
1. Select a account with mutiple folders and sub folders.
2. Open a folder with subfolders in it.
3. Read a msg in the subfolder.
4. Now Click on the rootFolder twisty to collapse the account. Messenger 
freezes. :(

Build and platform: 2000-03-22-06-M15-nb1b on all platforms.

Important note: 
1. I've subfolders in my first folder(say folder 1) from last folder. I Click on  
folder 1 twisty to open folder 2. Read a msg on folder 2. Try to collapse the 
account. Freezes. But if I first click on folder1 twisty to close folder1 and 
then click on rootFolder twisty it works fine.
I can reproduce this on all platforms, too.  But it only happens when I'm
selecting toward the end of my folder hierarchy -- if I select a message in a
folder toward the top of the hierarchy, I can't reproduce this.  Note: I can
also reproduce this selecting a message in a top level folder, not a subfolder.
QA Contact: lchiang → laurel
Target Milestone: ---
Adding crash and beta1 keywords for evaluation by PDT team
Keywords: beta1, crash
I'll try this out. Selmer, I hope you don't mind if I re-assign this to me =).
Assignee: selmer → mscott
I wasn't seeing this on a branch build from the other night. I'm repulling now.
putterman, I'm not sure if phil talked to you or not about this. But can you
please look into this problem on the beta branch? I'm busy helping out with some
activation problems on the branch.Thanks!
so far I can't reproduce this.  does it matter if it's imap or pop?
I was using IMAP.
I have about 20-25 top level folders in my default IMAP account.  About as many
subfolders, but not subfolders off each top level.  
I selected the folder which is next to last in the account's hierarchy. It is a
top level folder.  
I selected the last message in the folder.
I collapsed the account/server hierarchy. (I first had to use the slider to get
to the top of the hierarchy.)
I was also using IMAP account originally. Couldn't reproduce on POP account.
ok, it can happen with both Imap and Pop.  I got this to happen in my debug 
build and I end up in what seems to be an infinite loop in 
nsPresShell::ProcesReflowCommands

I put a break point after this loop and I never hit it.
    while (0 != mReflowCommands.Count()) {

    }

reassigning to nisheeth. cc'ing troy.  I imagine other code can be causing this, 
but I don't know how to find it.
Assignee: mscott → nisheeth
Thanks everyone for jumping on this stuff.  Sorry to get in the way by not
getting bugs reassigned quickly.
I debugged this on Suresh's machine using this Monday's debug build.

The conditions that cause the hang are:

1) The mail folder pane should have scrollbars in it.
2) A subfolder in the mail folder should be selected.
3) The size of the folder pane should be such that collapsing the root folder 
causes the scrollbars to go away.

If these three conditions are met, and you click on the root folder's "twisty" 
to collapse it, mozilla hangs.

The hang happens because the ProcessReflowCommands() loop in the pres shell 
never exhausts the reflow command queue.  We get down to one reflow command 
targeted at the tree widget but while processing that reflow command, the tree 
widget generates a new one.

The reflow commands always get generated be the MarkTreeDirty() call in 
nsTreeRowGroupFrame::ReflowScrollBar() after that code decides to nuke the 
scrollbars.

Here's what I don't understand.  nsTreeRowGroupFrame::ReflowAfterRowLayout() 
calls ReflowScrollbar() in which the scrollbar gets nuked.  Right after that, 
ReflowAfterRowLayout() creates the scrollbar again.  Once the tree has 
determined that it doesn't need a scrollbar, why does it create a new scrollbar?
Adding jar, rickg, hyatt to the cc list.  Please read the comments I just posted 
to this bug report.  Thanks.
Re-assigning to hyatt.  Please read the comments above.  Thanks.
Assignee: nisheeth → hyatt
Putting on PDT- radar for beta1.
Whiteboard: [PDT-]
Status: NEW → ASSIGNED
Target Milestone: --- → M18
Mass moving M18 bugs to M19
Target Milestone: M18 → M19
Target Milestone: M19 → M20
I also ran into this crash when I was removing mail accounts and then scrolling 
the folder pane afterwards.  I'm going to nominate for nsbeta3.
Keywords: nsbeta3
maybe this will be fixed by the tree rewrite.
fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I'm not able to reproduce using jun22 commercial build on linux rh6.0, NT 4.0
and mac OS 9.0
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.