Last Comment Bug 533504 - Back/forward history may contain null values and prevent the history from displaying
: Back/forward history may contain null values and prevent the history from dis...
Status: UNCONFIRMED
dupme
:
Product: Thunderbird
Classification: Client Software
Component: Folder and Message Lists (show other bugs)
: unspecified
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 527711
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-08 10:29 PST by Ben Lerner
Modified: 2015-09-25 06:13 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
screenshot of buggy back history (84.45 KB, image/png)
2009-12-08 10:30 PST, Ben Lerner
no flags Details
buggy back menu on TB2 (40.96 KB, image/png)
2009-12-09 09:52 PST, Ben Lerner
no flags Details
screenshot of gaps in back menu, on TB10 (23.19 KB, image/png)
2012-03-07 08:28 PST, Ben Lerner
no flags Details

Description Ben Lerner 2009-12-08 10:29:36 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)
Build Identifier: TB 3.0 rc2

Usually after navigating through many emails and/or blog posts and/or newsgroup messages, I want to shoot back through my history until I reach my inbox again.  Usually I use the [ key to go as fast as I can (if there were a keystroke to trigger the back/forward dropdown menus, I might use those instead).  But sometimes, the back/forward menus get corrupted, containing null values (I think): In TB2.*, the dropdown menu might explicitly say "(null)" for some entries, or just not display; in TB3.0rc2, the dropdown menu either does not display at all or may contain blank entries (see screenshot).  If I hold down the [ key some more, I may "teleport" way back in my history to an earlier message without passing through any of the messages on the way.  If I then look at the forward history, it's equally corrupt, but holding ] may teleport me forward...

Reproducible: Sometimes

Steps to Reproduce:
I haven't tracked down the root cause of this yet, but the following scenario has seemed common and plausible.

1. Have two folders, A and B.  In folder B have at least one unread message; in folder A have at least one unread *thread* of messages, followed by at least one unread message in its own thread.  Start in folder A.
A: msg1a
     msg1b
     msg1c...
   msg2
B: msg3
2. Use N to read through all the unread messages, continuing into folder B's msg3.
3. Press the [ key once.  You should be on msg2 in folder A, *and the msg1 thread should have automatically collapsed*.
4. (This is the step that doesn't always reproduce for me...) Press [ once more.  You'll go nowhere.  
5. Press [ twice more.  You should now be on msg1a.

Variations on this theme: before steps 3, 4 or 5, check the back or forward history lists.  The history list may not drop down.
Actual Results:  
The history lists do not display, and navigation fails.


The only two errors I see in the console are

Error: Permission denied for <mailbox://> to call method Location.toString
Source File: XPCSafeJSObjectWrapper.cpp
Line: 450

Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFService.GetResource]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Thunderbird/modules/MailUtils.js :: MailUtils_getFolderForURI :: line 118"  data: no]

Right now I can definitely reproduce the second error when I try to view the forward history, but I think the first error may be related too...

(FWIW, I've seen this problem in safe mode with the standard theme too; this screenshot was taken with extensions and with the Silvermel theme enabled, but they seem to be irrelevant.)
Comment 1 Ben Lerner 2009-12-08 10:30:30 PST
Created attachment 416592 [details]
screenshot of buggy back history

The email addresses and subjects have obviously been blurred, but the highlighted item is pristine...and empty :(
Comment 2 Ben Lerner 2009-12-09 09:26:16 PST
Another possibly related problem with the history lists: (this reproduces in TB2 and safe mode too)
1. In folders A, B and C, have at least one unread message in each.  Start in A.
2. Press N twice to read messages in A and B.  Press [ to go back to A.
3. Press N to read message in C.
4. Press ] -- which should do nothing, since you're at the front of your history.  Instead, it may cycle to to B.  Moreover, B will be in the forward history *twice*.

As I understand it, message history should be completely linear, and if you go back in your history and then go forward to a new message, you should lose the front portion of your history (just as in a browser).  I don't know the internals of the code, but I assume the history is a linked list of messages, and somehow stale pointers are being reused...
Comment 3 [:Aureliano Buendía] 2009-12-09 09:41:23 PST
Could be a dupe of bug #527711. Ben what you think?
Comment 4 Ben Lerner 2009-12-09 09:52:28 PST
Created attachment 416769 [details]
buggy back menu on TB2

I don't think this is a dupe.  I've seen that bug before too, but in this one I don't get that error message in the console, and the menu does display sometimes.  (When it doesn't display, it doesn't display at all, rather than the 6px box you showed in your screenshot.)

This screenshot shows behavior in TB2 (prior one was TB3) where the null items are rather explicit.  I don't recall the exact steps in this one, but it was simply moving back and forward through already-read messages in my Inbox using B and F, and not always waiting for the preview pane to catch up.  I know I skimmed past several threads, between emails that I paused long enough for hte preview pane to refresh; that might have something to do with it.
Comment 5 [:Aureliano Buendía] 2009-12-09 10:19:25 PST
(In reply to comment #0)

> Error: uncaught exception: [Exception... "Component returned failure code:
> 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFService.GetResource]"  nsresult:
> "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::
> file:///C:/Program%20Files/Mozilla%20Thunderbird/modules/MailUtils.js ::
> MailUtils_getFolderForURI :: line 118"  data: no]

but this it seems the same error of bug #527711... also if effects it seems different. But at this moment I'm not sure.
Comment 6 Ben Lerner 2009-12-09 11:04:50 PST
you're right, they are the same error message, but the repro circumstances and symptoms seem different---though they might share the same underlying problem.  specifically, 
* I'm seeing this behavior in TB2 also (which is way outside the regression range you found in bug 527711)
* I'm getting weird "null:null" or blank menu items or no menu at all, instead of a 6px menu containing nothing
* I got the above error while looking at the forward history list rather than back (though I'm sure some STR could trigger it for back as well)

Whether these two bugs are dupes (and maybe bug 430487 as you mentioned as well) or not, it's good to know that it's not just me seeing them, even though my STR are only sometimes successful :)
Comment 7 Ludovic Hirlimann [:Usul] 2009-12-09 23:02:09 PST
So if the STRs in 527711 are more reliable let's have bug 527711 fixed and figure out if this one get's fixed too.
Comment 8 Ben Lerner 2009-12-17 11:16:21 PST
I don't know if this is exactly the same bug, but I'm hitting it very frequently.  I start with a message in my Inbox.  I have two blogs, each with 1 unread message.  Use ] twice to go to the two unread messages.  Use [ a bunch of times (more than 2!) to get back to the inbox.  Now any amount of ] does nothing, I can't get back to the blog posts by back/forward.  Moreover, even though the Forward toolbar button is enabled, clicking on it does nothing.  In the Go menu, Forward is disabled and Backward is enabled -- that's weird, and backwards to the toolbar buttons.

In another bug it was suggested to check whether a folder is selected in the folder list.  It is, but I tried explicitly clicking on it anyway.  Suddenly, my Forward toolbar-menu becomes disabled, and my Back toolbar-menu becomes enabled, with one item: the email in my inbox that I'm currently viewing!  Curiouser and curiouser.

Then I try fiddling with the Go menu's Forward and Back menu items.  I can press Forward: press it once, and both Go>Back and Go>Forward are enabled.  Press it again, and now Go>Forward is disabled, but the Forward toolbar-menu is enabled (and vice versa for the Back menu and toolbar-menu).  Pressing Go>Back twice undoes the menu changes (Go>Back is disabled, Go>Forward is enabled) but the toolbar-menus are still out of sync.

Through all of this there are zero errors in the console.

It seems to me there's some sort of disconnect between actual message navigation and the menu and toolbar-menu updating code, and that this bug, bug 527711 and bug 430487 may all be symptoms of that underlying disconnect.
Comment 9 Ludovic Hirlimann [:Usul] 2009-12-18 03:05:17 PST
Ben do you have the issue if you run Thunderbird in -safe-mode (http://kb.mozillazine.org/Breakpad) ?
Comment 10 Ben Lerner 2009-12-22 21:03:55 PST
yep.  not seeing errors in the console though, but definitely getting this weird behavior in safe mode, and after restarting TB, and after rebooting.

I wish I had more detailed information to give you...
Comment 11 Ben Lerner 2010-01-27 15:50:40 PST
Here's a very reliable STR, that I've been seeing pretty much all the time in TB3/3.0.1:

1. Have new, unread messages in several folders A, B, C...
2. Use ] to read them all.
3. Press [ and watch what happens.

As you regress from the last message in C towards the first one you visited in C, everything's fine...until you get to the very first message, which will not display.  Selection pauses on the second message in C.  The menus/buttons get all wonky as above.  Press [ again and you'll jump from the second message in C to the last message in B.  Press [ some more until the whole thing repeats with B: the first message will not highlight, and another [ will jump you back to A.

This repros consistently for me for regular folders, saved search folders, blog folders and newsgroups, fwiw.  Also, see bug 533499 with other problems stressing the [/] mechanism.
Comment 12 Philip Durbin 2011-05-10 07:47:05 PDT
I see the platform for this bug is x86 Windows XP but I thought I'd mention that I'm seeing this problem on Linux as well after upgrading from Thunderbird 2.0 to 3.1.  Please see also my post at http://superuser.com/questions/281559/why-dont-the-back-and-forward-buttons-work-as-consistently-in-thunderbird-3
Comment 13 Wayne Mery (:wsmwk, NI for questions) 2012-02-11 10:01:09 PST
Reporter, 

do you still see this problem when using a current version of thunderbird? 

And if you do not, please close bug report by changing resolution to worksforme
Comment 14 Ben Lerner 2012-02-11 10:06:11 PST
Nope, I still see this in TB10 and in a fairly-recent TB12 nightly.  Sorry...
Comment 15 Ben Lerner 2012-03-07 08:28:57 PST
Created attachment 603737 [details]
screenshot of gaps in back menu, on TB10

A screenshot of a (relatively severe) instance of the problem in TB10.  I noticed one thing that may help reproduce the issue further: if I look at the back menu, I see a bunch of entries.  If I move a message that currently appears in the history to another folder, and then look at the back menu again, the entries corresponding to that message are now blank.  Moving the message back to its original folder makes the messages appear again.  Additionally, I see the following error on the console:

Error: An error occurred executing the cmd_goBack command: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFService.GetResource]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource:///modules/MailUtils.js :: MailUtils_getFolderForURI :: line 128"  data: no]
Source File: chrome://global/content/globalOverlay.js
Line: 100

which plausibly fits with the "message not in the folder we expected" scenario...

Note You need to log in before you can comment on or make changes to this bug.