Update from Gran Paradiso Alpha 2, Alpha 3, and Alpha 4 -> FF Beta 2 cause [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDocShellHistory.useGlobalHistory]

VERIFIED FIXED in Firefox 3 beta3

Status

()

P3
normal
VERIFIED FIXED
11 years ago
9 years ago

People

(Reporter: cbook, Assigned: moco)

Tracking

({dataloss, relnote})

Trunk
Firefox 3 beta3
dataloss, relnote
Points:
---
Dependency tree / graph
Bug Flags:
blocking-firefox3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
Created attachment 293240 [details]
UI after A2 - Beta 2 Update

Found during the QA Update Testing from Gran Paradiso Alpha 2 to Firefox 3 Beta 2 cause UI Problems (see Screenshot), the Bookmarks Toolbar is missing, the History is gone and also the address bar/search plugin seperator isn't even there.

JS Errors are:

Error: 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 723"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: chrome://browser/content/places/utils.js :: anonymous :: line 107"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: chrome://browser/content/places/utils.js :: anonymous :: line 125"  data: no]

Comment 1

11 years ago
This repros on mac alpha 2 -> Beta 2 update as well.

I confirm that my saved bookmarks and history gets blown away after update. 

Error: uncaught exception: [Exception... "Invalid ClassID or ContractID"  nsresult: "0x80570017 (NS_ERROR_XPC_BAD_CID)"  location: "JS frame :: file:///Users/tchung/Desktop/FF30a2/GranParadiso.app/Contents/MacOS/components/nsInterfaceInfoToIDL.js :: <TOP_LEVEL> :: line 45"  data: no]

OS: Windows XP → All
Hardware: PC → All
(Reporter)

Comment 2

11 years ago
During more testing of tchung and me we can confirm that this problem happen on Alpha2, Alpha3 and Alpha 4 updates to Beta 2.

Alpha1 and Alpha5 are fine after update to Beta 2.

Updated

11 years ago
Flags: blocking-firefox3?
Summary: Update from Gran Paradiso Alpha 2 to Firefox 3 Beta 2 cause [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDocShellHistory.useGlobalHistory] → Update from Gran Paradiso Alpha 2, Alpha 3, and Alpha 4 -> FF Beta 2 cause [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDocShellHistory.useGlobalHistory]

Comment 3

11 years ago
Should we skip updates then for alpha 2-4 users?
1) If needed, Build can easily delete the generated updates for alpha2/3/4 from the update channels, so we would not offer updates to alpha2/3/4 users.

2) Is this alpha2/3/4 problem happening on all O.S. or specific to one platform?

3) What happens to users on alpha6/7/8, and of course, on beta1?

Comment 5

11 years ago
This affects mac builds too for alpha 2/3/4.  Same behavior as windows.  I havent tested linux, but its a good chance it happens the same.

For alpha 1/5/6/7, they update correctly and the bookmarks and history are retained as expected.   My hunch is there was a regression someplace between alpha 2/3/4 when places was introduced that broke this behavior.

My recommendation is to pull alpha 2/3/4 users from the beta 2 updates, and figure out a solution before the next beta if necessary.

Comment 6

11 years ago
Dietrich/Seth is this a known issue?
> dietrich/Seth is this a known issue?

This is the first I've heard of this.

I'll investigate.

> My recommendation is to pull alpha 2/3/4 users from the beta 2 updates, and
> figure out a solution before the next beta if necessary.

This seems like a good idea, until we know what is going on.
Assignee: nobody → sspitzer
Target Milestone: --- → Firefox 3 M11

Comment 8

11 years ago
Okay, this is NOT reproducing on linux builds.  Alpha 2/3/4 update just fine to beta 2 and the places information gets retained upon launch.   I tested this against Ubuntu.
Based on comments #7, #8, I've filed bug#408610 to track removing the alpha2/3/4 updates for win32 and mac only.
I'm able to reproduce this on windows by creating a profile with alpha 2 and then running the trunk.

in my console:

WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 1075
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 634
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 492
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 349
++DOMWINDOW == 2
++WEBSHELL 00C708C8 == 2
++DOMWINDOW == 3
++DOMWINDOW == 4
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 1075
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 634
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 492
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 349
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 1075
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 634
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 492
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 349
++WEBSHELL 05429B38 == 3
++DOMWINDOW == 5
++DOMWINDOW == 6
WARNING: empty langgroup: file c:/builds/trunk/mozilla/gfx/thebes/src/gfxFont.cp
p, line 875
WARNING: empty langgroup: file c:/builds/trunk/mozilla/gfx/thebes/src/gfxFont.cp
p, line 875
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 1075
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 634
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 492
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 349
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 1075
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 634
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 492
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 349
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 1075
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 634
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 492
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:/builds
/trunk/mozilla/toolkit/components/places/src/nsNavHistory.cpp, line 349
JavaScript error: , line 0: uncaught exception: [Exception... "Component returne
d failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDocShellHistory.useGlobalHisto
ry]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome:/
/browser/content/browser.js :: prepareForStartup :: line 723"  data: no]
Status: NEW → ASSIGNED
we are failing in MigrateV6Up()

Note, from a2, our user_version is 0.

Specifically, this is failing:

    // add dateAdded and lastModified columns to moz_items_annos
    rv = aDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
      "ALTER TABLE moz_items_annos ADD dateAdded INTEGER DEFAULT 0"));

but we don't have the moz_items_annos yet, so that's why we are failing.
ah, my mistake.

it isn't there, so on first run of b2 we will create it here:

>	places.dll!nsAnnotationService::InitTables(mozIStorageConnection * aDBConn=0x00f88038)  Line 297	C++
 	places.dll!nsNavHistory::InitDB(int * aDoImport=0x0012e8d0)  Line 588 + 0x14 bytes	C++
 	places.dll!nsNavHistory::Init()  Line 344 + 0xf bytes	C++
 	places.dll!nsNavHistoryConstructor(nsISupports * aOuter=0x00000000, const nsID & aIID={...}, void * * aResult=0x0012e9a8)  Line 9 + 0x80 bytes	C++
 	xpcom_core.dll!nsGenericFactory::CreateInstance(nsISupports * aOuter=0x00000000, const nsID & aIID={...}, void * * aResult=0x0012e9a8)  Line 80 + 0x17 bytes	C++
 	xpcom_core.dll!nsComponentManagerImpl::CreateInstance(const nsID & aClass={...}, nsISupports * aDelegate=0x00000000, const nsID & aIID={...}, void * * aResult=0x0012e9a8)  Line 1714 + 0x1a bytes	C++
 	xpcom_core.dll!nsComponentManagerImpl::GetService(const nsID & aClass={...}, const nsID & aIID={...}, void * * result=0x0012ea5c)  Line 1926 + 0x34 bytes	C++
 	xpc3250.dll!nsJSCID::GetService(nsISupports * * _retval=0x0012ec4c)  Line 899 + 0x4a bytes	C++
 	xpcom_core.dll!NS_InvokeByIndex_P(nsISupports * that=0x0000000b, unsigned int methodIndex=1, unsigned int paramCount=1240140, nsXPTCVariant * params=0x0012ebd0)  Line 102	C++
 	xpc3250.dll!XPCWrappedNative::CallMethod(XPCCallContext & ccx={...}, XPCWrappedNative::CallMode mode=11)  Line 2342 + 0x1e bytes	C++
 	xpc3250.dll!XPCWrappedNative::CallMethod(XPCCallContext & ccx={...}, XPCWrappedNative::CallMode mode=CALL_METHOD)  Line 2342 + 0x1e bytes	C++
 	xpc3250.dll!XPC_WN_CallMethod(JSContext * cx=0x04361c00, JSObject * obj=0x03f92d40, unsigned int argc=1, long * argv=0x043bbe70, long * vp=0x0012eefc)  Line 1467 + 0xe bytes	C++
 	js3250.dll!js_Invoke(JSContext * cx=0x04361c00, unsigned int argc=1, long * vp=0x043bbe68, unsigned int flags=0)  Line 1356 + 0x20 bytes	C
 	js3250.dll!js_Interpret(JSContext * cx=0x04361c00, unsigned char * pc=0x041e766f, long * result=0x0012f5c0)  Line 4176 + 0x16 bytes	C
 	js3250.dll!js_Invoke(JSContext * cx=0x04361c00, unsigned int argc=3, long * vp=0x043bbcc0, unsigned int flags=2)  Line 1376 + 0x13 bytes	C
 	xpc3250.dll!nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS * wrapper=0x042c47f0, unsigned short methodIndex=3, const XPTMethodDescriptor * info=0x00cfbb40, nsXPTCMiniVariant * nativeParams=0x0012f8bc)  Line 1443 + 0x1b bytes	C++
 	xpc3250.dll!nsXPCWrappedJS::CallMethod(unsigned short methodIndex=3, const XPTMethodDescriptor * info=0x00cfbb40, nsXPTCMiniVariant * params=0x0012f8bc)  Line 568	C++
 	xpcom_core.dll!PrepareAndDispatch(nsXPTCStubBase * self=0x042c4660, unsigned int methodIndex=3, unsigned int * args=0x0012f97c, unsigned int * stackBytesToPop=0x0012f96c)  Line 114 + 0x21 bytes	C++
 	xpcom_core.dll!SharedStub()  Line 142	C++
 	xpcom_core.dll!nsObserverList::NotifyObservers(nsISupports * aSubject=0x042c4660, const char * aTopic=0x00000000, const unsigned short * someData=0x1003adc4)  Line 129	C++
 	xpcom_core.dll!nsObserverList::NotifyObservers(nsISupports * aSubject=0x00000000, const char * aTopic=0x1003adc4, const unsigned short * someData=0x00000000)  Line 129	C++
 	xpcom_core.dll!nsObserverService::NotifyObservers(nsISupports * aSubject=0x00000000, const char * aTopic=0x1003adc4, const unsigned short * someData=0x00000000)  Line 184	C++
 	xul.dll!XRE_main(int argc=3, char * * argv=0x00bdca78, const nsXREAppData * aAppData=0x00bdce68)  Line 3132	C++
 	firefox.exe!main(int argc=3, char * * argv=0x00bdca78)  Line 153 + 0x12 bytes	C++
 	firefox.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes	C
 	firefox.exe!mainCRTStartup()  Line 403	C
 	kernel32.dll!7c816fd7() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	

and then, after we call that code, we'll do the migration and attempt to alter the table that is already correct, and not handle it gracefully.

working on a fix.
Attachment #293550 - Flags: review?(dietrich)
Comment on attachment 293550 [details] [diff] [review]
patch

r=me, thanks for tracking this down.
Attachment #293550 - Flags: review?(dietrich) → review+
this bug was a regression from bug #319455 which landed in M7.

> Okay, this is NOT reproducing on linux builds.

That doesn't sound right to me.  This bug should be reproducable if the profile was created with a2 (or a3 or a4, according to tomcat's comments) and then you ran beta 2.  

Tony, is that what you did on linux?
Depends on: 319455
Attachment #293550 - Flags: approval1.9?

Comment 16

11 years ago
I did the following:
1) downloaded a2 from releases.mozilla.org
2) created and launched a new profile on alpha 2
3) saved some websites, generated some URL history
4) changed app.update.channel to "betatest"
5) ran help > check for updates and found the available update for Fx3.0b2
6) update and restart to b2.
7) Verified beta 2 restarts, and history and bookmarks appear.
8) Repeat steps 1-7 for alpha 3 and alpha 4.

with those steps, I would expect a2 -> b2 on linux to have the same problem as mac and windows.  let's meet and figure out why that isn't working.

Comment 18

11 years ago
Tomcat will re-test this on his linux box now.   Stand by for a confirmation or not.  

BTW, i tested this on ubuntu.
(Reporter)

Comment 19

11 years ago
(In reply to comment #18)
> Tomcat will re-test this on his linux box now.   Stand by for a confirmation or
> not.  
> 
> BTW, i tested this on ubuntu.
> 
The Updates on Fedora F8 from :
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9a2)
Gecko/2007020616 GranParadiso/3.0a2

Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9a3)
Gecko/2007032219 GranParadiso/3.0a3

Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9a4)
Gecko/2007042705 GranParadiso/3.0a4

to B2 went fine, no lost bookmarks and not the problems i saw on windows, so i can confirm the comment#8 from tony 

The only thing i saw after the updates is :

Error: uncaught exception: [Exception... "Invalid InterfaceID"
nsresult: "0x80570018 (NS_ERROR_XPC_BAD_IID)"  location: "JS frame ::
file:///opt/firefox/components/nsInterfaceInfoToIDL.js :: <TOP_LEVEL>
:: line 45"  data: no]

in the JS error Console.

Comment 20

11 years ago
Thanks tomcat.  seth is going back to debug on linux now, and will confirm a5 and a6 as well on other platforms.   bug 408610 will be the tracking bug for the release.

Comment 21

11 years ago
Comment on attachment 293550 [details] [diff] [review]
patch

Clearing the approval flag if you are done testing please re-nom
Attachment #293550 - Flags: approval1.9?
ok, I see why a5 / a6 profiles don't have this problem.

in a5, we added the new moz_annos_items table, see bug #379211.

So, for a5 and beyond, we would have had that table in our places.sqlite, so in
nsAnnotationService::InitTables(), we would not created the table as it
existed.  see
http://lxr.mozilla.org/mozilla/source/toolkit/components/places/src/nsAnnotationService.cpp#277

so only for a2,a3,a4 would we have this problem:

1)  ff3b2's nsAnnotationService::InitTables() creates moz_annos_items in the
places.sqlite from an old profile
2)  we hit the migration code in nsNavHistory::MigrateV6Up(), and this SELECT
fails:

SELECT a.dateAdded, a.lastModified, b.dateAdded, b.lastModified "
FROM moz_annos a, moz_items_annos b

But it fails because those columns are not in moz_annos (but they are in
moz_item_annos)

3)  the code to add those columns to moz_item_annos will fail, as the table was
created by ff3b2's nsAnnotationService::InitTables()

4)  the error progagates up and all hell breaks loose.

I don't know why linux doesn't have this problem though.
Attachment #293550 - Attachment description: patch, still testing... → patch
Attachment #293550 - Flags: approval1.9?
Comment on attachment 293550 [details] [diff] [review]
patch

a=beltzner for 1.9, thanks for confirming, seth
Attachment #293550 - Flags: approval1.9? → approval1.9+
dwitte helped me, and we debugged and verified that with linux, we do see part of the problem that we'd expect to see, which is the failure in nsNavHistory::MigrateV6Up()

on linux, even though we aren't seeing all the problem, we are seeing that history is lost when going from a2,a3,a4 -> b2.

This makes sense because we have code that if nsNavHistory::MigrateV6Up() fails, we'll throw out places.sqlite (with your history) and recreate it (so we'll get your bookmarks.)

this is what tony and I saw early today on his linux vm.  tony, can you confirm?
on a related not, see bug #327350 – initialization of places services can fail in error conditions.
bug #327350 was originally:  nsNavBookmarks::Init is fragile.

I think we need a new bug about nsNavHistory::Init() being fragile (as demonstrated by this bug) and we can continue to follow up there.
> we need a new bug about nsNavHistory::Init() being fragil

see bug #408751
fixed 

cvs commit: Examining .
Checking in nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v  <--  nsNavHistory.cpp
new revision: 1.213; previous revision: 1.212
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P3
Duplicate of this bug: 404565
Duplicate of this bug: 404695
Verified. 

I updated an Alpha 2 created profile to Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b3pre) Gecko/2007122704 Minefield/3.0b3pre. My history and bookmark settings were preserved. There were no errors in the error console.
Status: RESOLVED → VERIFIED
Duplicate of this bug: 408452

Comment 33

11 years ago
Reverified that updates from a2/a3/a4 properly updates to Beta 3.   This is true for linux, mac, and windows.
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.

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