Firefox Aurora PPA build fails to load XPCOM

Bug #809384 reported by Ben Hearsum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Invalid
Medium
Ubuntu Mozilla PPA Bugs
Triaged
High
Chris Coulson
firefox (Ubuntu)
New
Undecided
Unassigned

Bug Description

I first experienced this as links from other applications failing to open, but then after shutting down Firefox altogether I couldn't relaunch it without having /usr/lib/firefox-7.0a2 in LD_LIBRARY_PATH. I can't reproduce this problem with the upstream build.

Attached is the output from "strace -f firefox"

Revision history for this message
Ben Hearsum (bhearsum) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Confirmed that creating an empty "firefox" folder in my home folder is enough to prevent the aurora build from starting

Changed in ubuntu-mozilla-ppa-bugs:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Chris Coulson (chrisccoulson)
Revision history for this message
In , Chris Coulson (chrisccoulson) wrote :

On current nightly and aurora builds, Firefox will fail to start with "Couldn't load XPCOM" under these conditions:

1) The executable is loaded from the users PATH,
...and...
2) There is a file called "firefox" in the current working directory

This is because if you pass a relative path to realpath, it will resolve the path if the file exists in the current working directory. This causes mozilla::BinaryPath::Get() to return the wrong path.

This was reported to https://launchpad.net/bugs/809384 by Ben, who experienced this because he has a folder named "firefox" in his home directory. This is enough to prevent a current aurora build from starting

Revision history for this message
In , Chris Coulson (chrisccoulson) wrote :

Created attachment 545732
Don't call realpath when loaded from PATH

This fixes it by not calling realpath() if we are executed from the users PATH. This is determined by the absence of any separators in argv[0]. I did consider also checking that the result is actually an executable file too, but that seemed overkill.

Revision history for this message
In , Reed Loden (reed) wrote :

*** This bug has been marked as a duplicate of bug 670788 ***

Changed in firefox:
importance: Unknown → Medium
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.