Closed Bug 341007 Opened 18 years ago Closed 18 years ago

"Failed to initialize embedding" during 1.0.2rc startup


(Camino Graveyard :: General, defect)

1.8 Branch
Not set


(Not tracked)



(Reporter: mark, Assigned: mark)


(Keywords: fixed1.8.0.5, fixed1.8.1, Whiteboard: [camino-1.0.2])


(1 file)

I somehow managed to get my profile into a bogus state while using 1.0.2rc, such that I would get StartupFailureInitEmbeddingMsg on an attempt to start.  I wound up with a compreg.dat file devoid of anything interesting in the [COMPONENTS] section.  Tasks:

1. Figure out what caused this

2. When embedding init fails, (re)move compreg.dat and xpti.dat and try again.
   (We can do this now that the files live in the profile.)
I've seen this a time or so too, with the same fix Mark reports -- removing the compreg.dat file.

You should have reported it!
Mark, we need this for 1.0.2, right?
Flags: camino1.0.2?
Assignee: nobody → mark
Flags: camino1.0.2? → camino1.0.2+
The embedding API sucks and complicates the solution.
Attached patch PatchSplinter Review
I checked this patch in to the minibranch for 1.0.2 already and triggered a respin so that the next build may be used as 1.0.2rc2.

This bug would be triggered when you would be running a copy of Camino with compreg.dat in the profile, and you started another copy of Camino.  The second copy would find the compatibility.ini generated by the already-running app and recognize that compreg.dat needed to be rebuilt, so it would remove compreg.dat and initialize xpcom.  At some point, the profile lock would get in the way and the second copy would realize that the first copy was running, and abort.  This caused an incomplete compreg.dat file.  However, compatibility.ini was never removed, and it still indicated that the profile was suitable for the first Camino.  If that first Camino was quit and then restarted, it would find a compatibility.ini indicating that compreg.dat was suitable for itself, it would NOT remove the compreg.dat that was half-generated for another Camino version, and startup would fail.

The fix is to remove compatibility.ini along with compreg.dat when forcing reregistration.  In this way, a failed startup will at least leave the profile in a condition where a subsequent launch will need to reregister components.
Attachment #225519 - Flags: review?(mikepinkerton)
Comment on attachment 225519 [details] [diff] [review]

Attachment #225519 - Flags: review?(mikepinkerton) → review+
This was already on CAMINO_1_0_2_MINIBRANCH.  Now it's also on MOZILLA_1_8_0_BRANCH, MOZILLA_1_8_BRANCH, and the trunk.
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.