Closed Bug 466407 Opened 16 years ago Closed 16 years ago

History menu often shows duplicated items

Categories

(Firefox :: Bookmarks & History, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: jfkthame, Assigned: mak)

References

Details

(Keywords: regression, verified1.9.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081124 Minefield/3.1b2pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081124 Minefield/3.1b2pre

The History menu in Firefox often shows duplicate menu items for recently-visited pages; each time a new page is visited (or a previous location re-visited), it is inserted twice at the start of the menu.

When a new page is visited, existing duplicates may be cleaned out from the menu (so that only the newest item is duplicated), although this does not seem to happen in every case.

Reproducible: Always

Steps to Reproduce:
1. launch Firefox
2. open the History menu
3. choose a page from the middle of the menu, and wait for it to load
4. re-open the History menu
Actual Results:  
The revisited page appears twice at the top of the History menu.

Expected Results:  
The entry for the revisited page should be moved from its position in the middle of the History menu to the top of the list, but should only appear there once.

This has been observed on both Mac OS X and Linux builds from mozilla-central. I'm not sure if it is reproducible 100% of the time, but it is pretty consistent when browsing around some simple URLs such as
   http://www.mozilla.org/projects/minefield/
   https://developer.mozilla.org/en/Installing_Mercurial
   https://developer.mozilla.org/en/Configuring_Build_Options
   https://developer.mozilla.org/en/Build_Documentation
etc.

Note that the duplication is NOT seen when using "Show All History" to view the list in the Library window; it appears to only affect the menu.

It is not clear whether this is related to bug 424208, which refers to the History suggestions shown while typing a location.
please try in safe mode: http://support.mozilla.com/kb/Safe+Mode
also ensure the page DOES NOT redirect.
In Safe Mode, I have not seen duplication happen with the URLs from developer.mozilla.org mentioned above; however, I am still seeing it with the Minefield Start Page at http://www.mozilla.org/projects/minefield/, and with this Bugzilla page https://bugzilla.mozilla.org/show_bug.cgi?id=466407.

Sequence that reproduced the issue for me on Mac OS X:
- Start Minefield in safe mode
- Show All History, select all and delete
- Go to http://www.mozilla.org/projects/minefield/ by pasting in the URL
- Go to https://bugzilla.mozilla.org/show_bug.cgi?id=466407 by pasting the URL
- Go back to the Minefield start page by choosing from History menu
- Go back to the Bugzilla page from the History menu
- Visit the Moz Dev Centre URLs mentioned above
* At this point, the menu looked fine, no duplicates
- Go to the Minefield start page by clicking the Home toolbar button; note that this claims to go to exactly the same URL
- Go back to the Bugzilla page via the History menu
- Go to the Minefield start page again via the History menu
* Open the History menu. If it has not yet updated, close and reopen it. The Minefield Start Page is listed twice.

It's unclear to me whether the exact same sequence of steps will always produce the problem at the same stage; it seems a little unpredictable, and may be related to timing (because of how the History menu is updated separately, after page load), so the problem might depend on how quickly the pages are visited.
I found a regression range.

Works fine:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081027 Minefield/3.1b2pre

Broken
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081028 Minefield/3.1b2pre

Changesets in the above regression range are
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2008-10-28+08%3A05%3A18&enddate=2008-10-29+03%3A36%3A42


Reproducible: Always

Steps to Reproduce:
1. Start Firefox with new profile.
2. You can confirm in the History menu that
   404: File Not Found
   Minefield Stat Page
3. Go http://www.mozilla.com/en-US/firefox/?from=getfirefox
4. Go http://www.mozilla.org/projects/minefield/
5. re-open the History menu

Actual Results:  
The revisited page appears twice at the top of the History menu.
   Minefield Stat Page
   Minefield Stat Page
   Firefox web browser .....
   404: File Not Found

Expected Results:  
   Minefield Stat Page
   Firefox web browser .....
   404: File Not Found
Sorry I was mistake changesets.

Corrected Changesets in the above regression range are
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2008-10-27+03%3A42%3A33&enddate=2008-10-28+08%3A05%3A18
that range points to fsync stuff, hwv, with your steps i can reproduce it, so i'm confirming
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Firefox 3.1
Attached patch patch v1.0Splinter Review
special history queries are wrong, and this is a regression from fsync indeed.

this needs a couple perf tests, i'll ask review after those.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
asking blocking because history menu is actually wrong, and that's quite visible, we don't filter out duplicates in the query from the memory table.
Flags: blocking-firefox3.1?
Flags: in-testsuite?
Blocks: 449086
Keywords: regression
OS: Linux → All
Hardware: x86 → All
Whiteboard: [needs perf tests]
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Priority: -- → P1
Comment on attachment 354892 [details] [diff] [review]
patch v1.0

ok, tested perf locally, i can't see regressions, goin on with review.
Attachment #354892 - Flags: review?(dietrich)
Whiteboard: [needs perf tests]
Target Milestone: Firefox 3.1 → Firefox 3.2a1
Version: unspecified → Trunk
Comment on attachment 354892 [details] [diff] [review]
patch v1.0

r=me, thanks!
Attachment #354892 - Flags: review?(dietrich) → review+
http://hg.mozilla.org/mozilla-central/rev/80118343c779
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite? → in-testsuite+
Blocks: 462214
Blocks: 462118
verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090127 Shiretoko/3.1b3pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: