Closed Bug 378659 Opened 15 years ago Closed 15 years ago

Firefox UI frequently becomes broken; removing places.sqlite "fixes" it


(Firefox :: Bookmarks & History, defect)

Not set





(Reporter: jruderman, Assigned: dietrich)


(Keywords: dogfood, regression)


(2 files)

Twice in the last two days, Firefox (Mac trunk debug) has refused to start up properly until I removed my places.sqlite file.  The address bar doesn't update properly, the bookmarks toolbar appears empty, etc.  There are a bunch of history-related errors in the console:

JavaScript error: , line 0: uncaught exception: [Exception... "ServiceManager::GetService returned failure code:"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: chrome://browser/content/places/controller.js :: <TOP_LEVEL> :: line 1373"  data: no]

JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDocShellHistory.useGlobalHistory]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://browser/content/browser.js :: prepareForStartup :: line 860"  data: no]

JavaScript error: , line 0: uncaught exception: [Exception... "ServiceManager::GetService returned failure code:"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: chrome://browser/content/places/utils.js :: anonymous :: line 100"  data: no]
Flags: blocking-firefox3?
This is preventing me from getting work done (because it breaks launching Firefox with a URL on the command line).
The 2007-04-22 nightly (two days ago) works fine with the same history file.
Attached patch fixSplinter Review
that places.sqlite file has the schema changes from bug 377066, but the schema version has not been updated (eg: the schema is updated to v3, but the pragma is 2). i'm not yet sure how that happened, as i can't reproduce it.

the attached patch accounts for this scenario, and provides a more paranoid schema upgrade approach. it also removes an unnecessary call that shouldn't have been there.
Attachment #262709 - Flags: review?(mano)
do you use this profile with multiple builds?

because i think if you opened the db from builds with schema versions in this order: 2 -> 3 -> 2 -> 3 then this might be able to happen.
Comment on attachment 262709 [details] [diff] [review]

>Index: toolkit/components/places/src/nsNavHistory.cpp

>+    nsCAutoString err;
>+    aDBConn->GetLastErrorString(err);
>+    printf("nsNavHistory::MigrateV3Up(): SQL ERROR: %s\n", err.get());

#ifdef DEBUG_dietrich?

r=mano otherwise.
Attachment #262709 - Flags: review?(mano) → review+
removed the debug output

Checking in toolkit/components/places/src/nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v  <--  nsNavHistory.cpp
new revision: 1.119; previous revision: 1.118
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Flags: blocking-firefox3? → blocking-firefox3+
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.