Closed Bug 477096 Opened 15 years ago Closed 15 years ago

Extension (C++) fails to get instance of nsIXULRuntime

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: andris.pavenis, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121622 Fedora/3.0.5-1.fc10 Firefox/3.0.5
Build Identifier: Thunderbird-3.1a1pre and Firefox-3.2a1pre >= 2009/02/03

I'm getting error message from the following code:

nsCOMPtr<nsIXULRuntime> runtime = do_GetService("@mozilla.org/xre/app-info;1", &rv);
if (NS_FAILED(rv))
{
   logMessage("mozvoikko: Failed to get nsIXULRuntime instance"
        " (service @mozilla.org/xre/app-info;1)");
   return rv;
}

Extension works with 
- all Firefox 3.0.X, 3.1b2, 3.1b3pre
- Firefox 3.1a1pre before 2009/02/03 but not after (tested with i686 and x86_64 Linux)
- Thunderbird-3.0b1, 3.0b2pre
- Thunderbird 3.1a1pre before 2009/02/03 but not after (tested i686 Linux)
- Seamonkey 2.0a3pre (perhaps before 2009/02/03, I have not tested later)




Reproducible: Always

Steps to Reproduce:
1.Install nightly version (Thunderbird or Firefox) newer than 2009/02/03 on Linux system

2.Get and install extension from http://ap1.pp.fi/mozilla/mozvoikko/0.9.6/ (there are Linux-ix86_gcc3 and Linux-x86_64_gcc3 versions only).

3a. Look whether Finish language is available in list of spellcheck directories
3b. Look whether there is error messages about getting nsIXULRuntime instance in error console (Tools -> Error console)
 
Actual Results:  
With broken versions I'm getting following message in error console.

mozvoikko: Failed to get nsIXULRuntime instance (service @mozilla.org/xre/app-info;1)

Failed to get directories where Voikko libraries and data are installed

Additionally Finnish language spell-check is not available

Expected Results:  
One can test the same extensions with for example Firefox-3.0.6 or Thunderbird-3.1b1: for both I'm not getting similar error message and Finnish language spell-check works. The final message in error console from mozvoikko is:

libvoikko.so.1 is successfully initialized.

after messages that several other shared libraries are loaded.


URLS due to extension license (GPL):
Homepage: http://ap1.pp.fi/mozilla/mozilla+voikko.html contains sources of additional components and older extension version, but it's in Finnish (sorry).

Current extension sources: http://voikko.svn.sourceforge.net/viewvc/voikko/trunk/mozvoikko/ (from these the provided extensions are built)
Flags: blocking-thunderbird3?
Component: General → Startup and Profile System
Product: Thunderbird → Toolkit
QA Contact: general → startup
Version: unspecified → Trunk
Flags: blocking1.9.1?
http://hg.mozilla.org/mozilla-central/rev/ad08e07cb8e6

The IID of nsIXULRuntime changed (on trunk only) for bug 475811. You are presumably building against an SDK for 3.1 which doesn't have this change. This is by design.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Depends on: 475811
Resolution: --- → INVALID
Flags: blocking1.9.1? → blocking1.9.1-
Flags: blocking-thunderbird3? → blocking-thunderbird3-
You need to log in before you can comment on or make changes to this bug.