Back widget "Go back one message" can easily go broken
Categories
(Thunderbird :: Folder and Message Lists, defect, P2)
Tracking
(thunderbird_esr68 fixed, thunderbird72 fixed, thunderbird73 fixed)
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
References
Details
Attachments
(3 files, 3 obsolete files)
|
16.19 KB,
image/png
|
Details | |
|
12.34 KB,
image/png
|
Details | |
|
2.57 KB,
patch
|
aceman
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
I use the "Back widget" which you can place onto the toolbar via customisation a lot. Sadly it's terribly buggy.
I frequently notice that the message I'm looking for does not show up in the drop-down. Often the widget is enabled, but clicking the arrow to summon the history of visited messages gives an empty list. I'll attach a screenshot when it happens next.
I was looking for some STR, and found this:
Show a few messages in the preview and check that they show up in the list. Then delete/move one of those. That results in an empty entry in the list.
I'm sure there other malfunctions, I'll report more STR later.
Given that this is such an obvious bug, I wonder whether it has been reported before. I can't remember having seen it. Magnus, Aceman, Wayne, does this ring a bell?
BTW, I tried TB 52 and 60 and the mess-up after message move is there as well.
| Assignee | ||
Comment 1•5 years ago
|
||
OK, here's the empty list which also should the white dot as do all empty pulldowns which should have been disabled. How did I reproduce it? Hmm, I visited some messages in one folder, delete one of them, then visited a message in another folder, and then checked.
The feature is really pretty useless since it's as buggy as hell. Whether you'll find a message you looked at previously in day-to-day operation is pure luck, I'd say mostly you won't find it.
| Assignee | ||
Comment 2•5 years ago
|
||
I've done a bit of digging, this is connected to cmd_goBack and button_goBack from here:
Looking at cmd_goBack first, the relevant code could be in these places:
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mail/base/content/mail3PaneWindowCommands.js#502
calling gDBView.navigateStatus()
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mail/base/content/mail3PaneWindowCommands.js#844
calling GoNextMessage()
And for stand-alone windows we have:
https://searchfox.org/comm-central/source/mail/base/content/messageWindow.js#1178
calling gDBView.navigateStatus()
and
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mail/base/content/messageWindow.js#1453
calling performNavigation() here:
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mail/base/content/messageWindow.js#1496
calling CrossFolderNavigation(type).
And the menu is build in backToolbarMenu_init():
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mail/base/content/mailWindowOverlay.js#1445
calling populateHistoryMenu() here:
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mail/base/content/mailWindowOverlay.js#1460
That calls messenger.getNavigateHistory() which is here:
https://searchfox.org/comm-central/rev/4476e6b96f49e626f32923258250f60484851851/mailnews/base/src/nsMessenger.cpp#1937
and simply returns the content of mLoadedMsgHistory.
On a cursory look I can't see any code deleting entries for deleted messages. That would explain the blank entries, but not the empty but non-disabled dropdown.
Comment 3•5 years ago
|
||
Doesn't sound familiar, but I don't use navigation nor pay much attention to such bugs
| Assignee | ||
Comment 4•5 years ago
|
||
Here's a first attempt. While testing it, I ran into the empty list issue (attachment 9112740 [details]) and saw this in the console:
JavaScript error: chrome://messenger/content/mailWindowOverlay.js, line 1496: TypeError: folder is null
Interesting.
| Assignee | ||
Comment 5•5 years ago
|
||
This does the trick for me. I'm sure the reviewer will tell me whether I'm glossing over more severe issues.
| Assignee | ||
Comment 6•5 years ago
|
||
I've patched my omni.ja file and this is working fine on TB 68 for the last 24 hours in production.
Comment 7•5 years ago
|
||
| Assignee | ||
Comment 8•5 years ago
|
||
Yes, I can remove the comment or change it. What do you suggest? This is pure TB, and as I said at the end of comment #0, not working in TB 52 or TB 60 when the referenced code didn't exist.
Comment 10•5 years ago
|
||
This does look like bug 533504.
| Assignee | ||
Comment 12•5 years ago
|
||
(In reply to :aceman from comment #9)
I could understand the msgAuthor variable (IF that its the right one to
check for existence), but what does msgSubject add?
Puts all the assignments into one block instead of spreading them all over the function.
Could this be msgSubject too?
Yes, it should be.
To answer the author question: In general, a message that doesn't have an author will be somewhat corrupt, don't you think? I was going to so a if (!msgSubject || !msgAuthor) since empty subjects don't look good in the menu. I'm open to better ideas, but given that this is just about filling in a menu, it doesn't need to be super precise, IMHO.
That's for the bug reference. As Magnus keeps saying: All the bugs have already been reported :-(
| Assignee | ||
Comment 13•5 years ago
|
||
Did you hit a case when it is null?
See comment #4, but I don't have the exact steps. I only know that it happens all the time in production. With my patched 68.3 I haven't seen it again. One could try to get the exact steps, and then just not access folder if it's null/undefined to see what message that is referring to in the history.
| Assignee | ||
Comment 14•5 years ago
•
|
||
Fixed the nits. I'm still using msgAuthor for the test. I tried msgHdr.messageKey, but that's not returned null, instead the subject and author come back blank :-(
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 15•5 years ago
|
||
| Assignee | ||
Comment 16•5 years ago
|
||
OK, this is my final offer.
I added this debug
if (!msgAuthor && !msgSubject) {
// Avoid empty entries in the menu. The message was most likely (re)moved.
+ dump(`=== continuing ${msgHdr.messageKey)\n`);
continue;
}
and saw: === continuing 6
I'm not sure what that means, but it's pretty clear that a message that has moved still ha a key.
| Assignee | ||
Updated•5 years ago
|
Comment 17•5 years ago
|
||
| Assignee | ||
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/4b9f7d78c4c9
Don't include (re)moved messages/folders in back/forward history menu. r=aceman DONTBUILD
| Assignee | ||
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
Updated•5 years ago
|
Description
•