Closed Bug 284188 Opened 20 years ago Closed 19 years ago

Corrupt extension install.rdfs cause an infinite loop on startup

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jcginn, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050227 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050227 Firefox/1.0+

When starting Firefox with an old profile, it is possible to trap Firefox in an
endless loop of "corrupt install.rdf" alert messages - if the profile contains
an extension with a corrupt install.rdf file. I initially triggered this bug
using the latest stable version of the googlebar extension (the latest
experimental version has been fixed).

Reproducible: Always

Steps to Reproduce:
1.Install an older trunk build (before 2/17).
2.Install an extension with an invalid install.rdf (such as the googlebar
version 0.9.0.30 extension).
3.Update Firefox to the most recent nightly.
4.Attempt to start Firefox.

Actual Results:  
Firefox will not start and is stuck in an endless loop of "corrupt install.rdf"
error messages.

Expected Results:  
Firefox alerts the user to the corrupt install.rdf file and disables the
offending extension.

I think this might be a regression from Bug 278534. I was able to workaround the
problem by loading Firefox in safe mode and disabling googlebar.
The extension StumbleUpon also will cause the infinite error loop.
Version: unspecified → Trunk
Flags: blocking-aviary1.1?
I found the infinite-restart loop also happens if extensions/Extensions.rdf has
a bad entry, such as this one created by the EM in a previous life:

<RDF:Description
    RDF:about="urn:mozilla:extension:m/~ginda/chatzilla/xpi/chatzilla-0.9.64f.xpi"
    NS2:toBeUninstalled="true" />

which caused the following spew prior to each restart:

*** loading the extension datasource
*** getItemProperty failing for lack of an item. This means getResourceForItem
failed to locate a resource for aItemID (item ID =
m/~ginda/chatzilla/xpi/chatzilla-0.9.64f.xpi, property = installLocation)
*** nsExtensionManager::_finishOperations - failure, catching exception so
finalize window can close [Exception... "Component returned failure code:
0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.append]"  nsresult:
"0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame ::
file:///C:/DOCUME~1/James/MYDOCU~1/Mozilla.org/DEVELO~1/TREE-F~1/objdir/dist/bin/components/nsExtensionManager.js
:: getDirInternal :: line 145"  data: no]
I forgot to mention this, but the reason googlebar and stumbleupon cause the
loop is because they use an invalid namespace,

<RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

instead of

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
*** Bug 284277 has been marked as a duplicate of this bug. ***
This patch wallpapers over underlying code problems in the extension manager by
forcing restart to only occur once.
Attachment #176143 - Flags: review?(darin)
Comment on attachment 176143 [details] [diff] [review]
Guard against infinite restart, rev. 1 [checked in]

Doesn't this cause problems when we need to restart twice: once for profile
selection and once for EM purposes?
darin, no: the EM restarting recursion check takes place after profile selection
is all done.
Comment on attachment 176143 [details] [diff] [review]
Guard against infinite restart, rev. 1 [checked in]

ok then, r=darin
Attachment #176143 - Flags: review?(darin) → review+
Comment on attachment 176143 [details] [diff] [review]
Guard against infinite restart, rev. 1 [checked in]

Recursion guard is checked in. I'm leaving this bug open to fix the EM
exceptions.
Attachment #176143 - Attachment description: Guard against infinite restart, rev. 1 → Guard against infinite restart, rev. 1 [checked in]
sounds like this is fixed. 
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
The "real bug" isn't fixed yet.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: blocking-aviary1.1? → blocking-aviary1.1-
I suspect this is significantly improved with the new extension manager. I just
want to make sure we don't get into a situation where an extension is marked
with "needs-install" permanently.
Assignee: benjamin → nobody
Status: REOPENED → NEW
I can confirm that with 1.0.5, a MISSING [installdir]\extensions\extensions.rdf
file will result in an infinite loop... cant the browser, in that circumstance,
simply generate a "safe" extensions.rdf file to fix the problem? once that file
is replaced, the loop ends.
Sorry for double post, forgot to add, this only occurs during profile creation,
ie on first run.
I can't get this to happen any more with the new 1.5 EM changes.
Status: NEW → RESOLVED
Closed: 20 years ago19 years ago
Resolution: --- → WORKSFORME
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: