Closed Bug 626072 Opened 14 years ago Closed 14 years ago

History not showing up in autocomplete (for new nightly with autocomplete re-write, Jan 2011)

Categories

(Camino Graveyard :: Location Bar & Autocomplete, defect)

x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: markus.haenchen, Assigned: stuart.morgan+bugzilla)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en; rv:1.9.2.14pre) Gecko/20110114 Camino/2.1a1pre (like Firefox/3.6.14pre)
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en; rv:1.9.2.14pre) Gecko/20110114 Camino/2.1a1pre (like Firefox/3.6.14pre)

Only bookmarks were shown as autocomplete suggestions when typing in the location bar after upgrading from 2 January to 14 January 2011 nightly. 
Deleting my bookmarks.plist file fixed it (attached) and also adding my bookmarks.plist to completely new profile recreated the problem. 

Reproducible: Always

Steps to Reproduce:
1. Start typing any letter in the location bar

Actual Results:  
Only results from the bookmarks are shown as suggestions (under the header Bookmarks).

Expected Results:  
Both results from bookmarks and from history (under two separate headers) should be shown as suggestions (naturally assuming that there is a history and bookmarks for the given letter).

Workaround: Export your bookmarks. Quit Camino. Delete bookmarks.plist (and bookmarks.plist.bak) from your profile (~/Library/Applications Support/Camino). Start Camino, re-import your bookmarks.
I can reproduce this with the bookmarks file Markus attached.  In particular, I see (in my debug build):

Camino[28668]: 0 result nodes in OnVisit for 'http://caminobrowser.org/start/' (currentlyLoading = 0)

camino[28668]: WARNING: NS_ENSURE_TRUE(childCount == 1) failed: file /Users/smokey/Camino/dev/192branch/Camino192Branch/camino/src/history/HistoryDataSource.mm, line 276

Camino[28668]: *** NSRunLoop ignoring exception '*** -[NSCFString substringFromIndex:]: Range or index out of bounds' that raised during posting of delayed perform with target 0x15847920 and selector 'processNextBookmarkChunk'

I'm not sure why that's killing *history* in the autocomplete window instead of bookmarks, though.  Are bookmarks loaded first, and some get loaded, we hit an exception, and we get that subset of bookmarks and nothing else?

(Note also I'd previously visited http://caminobrowser.org/start/ in this profile before this launch, and that was the page Camino loaded on launch.  I suspect that bit is more of bug 553156.)
Severity: minor → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: camino2.1a1?
> Are bookmarks loaded first, and some get loaded, we hit an
> exception, and we get that subset of bookmarks and nothing else?

Yes, that's exactly it. To keep CPU and disk contention down we do them sequentially, and if the async loading system falls over at some point that's the end of that.

Thanks for saving the bookmark file! With a local repro case this should be easy to find and fix.
Assignee: nobody → stuart.morgan+bugzilla
Status: NEW → ASSIGNED
Flags: camino2.1a1? → camino2.1a1+
Attached patch fixSplinter Review
The issue was that the url string was %-escaped, but NSURL helpfully unescaped |host|, so a string match wouldn't find it. This fixes that case, but also bullet-proofs us against throwing an exception if NSURL finds more creative ways to make them not match.
Attachment #504177 - Flags: superreview?(mikepinkerton)
Attachment #504177 - Flags: superreview?(mikepinkerton) → superreview+
Landed http://hg.mozilla.org/camino/rev/1cccff20b696 (with a couple of comment fixes, since I noticed while landing that both comments were English-impaired)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: