java fails during startup of embedded mozilla with javaxpcom

[email protected]
Newsgroups gmane.comp.mozilla.devel.oji
Organization http://groups.google.com
Message-ID <[email protected]>
I am trying to startup a GRE and get it to do anything.
I failed.

The XUL framework installed in /Library/Frameworks is 1.9a6pre which I
compiled on my G4 PowerBook today.
I followed the example coded in
org.eclipse.swt.browser.AbstractMozillaBrowser. The startup method
looks like this:
[code]
        public void run(){

            getMozilla();
            GREVersionRange[] range = new GREVersionRange[1];
            range[0] = new GREVersionRange("1.8.0", true, "1.9",
false);
            // work with trunk nightly version 1.9a1  ^^

            try {
                File grePath = Mozilla.getGREPathWithProperties(range,
null);
                LocationProvider locProvider = new
LocationProvider(grePath);
                mozilla.initialize( grePath );
                mozilla.initEmbedding(grePath, grePath, locProvider);

                System.out.println( "Initted embedding" );

                nsIComponentManager componentManager =
mozilla.getComponentManager();


                System.out.println( "Terminating embedding" );
                mozilla.termEmbedding();

            } catch (FileNotFoundException e) {
                e.printStackTrace();
                // this exception is thrown if
greGREPathWithProperties cannot find a GRE
            } catch (XPCOMException e) {
                e.printStackTrace();
                // this exception is thrown if initEmbedding failed
            }
        }
[/code]

When I run the class that creates an executor and submits a runnable
that has this method as run(), the program terminates with a bus error
or with a 'java result 138'. The bus error when run from the
commandline and the latter when running in my IDE ( NetBeans ).

the result looks like this on the command line:
[code]
2007-06-20 23:12:16.801 java[22345] *** _NSAutoreleaseNoPool(): Object
0x9033370 of class NSPathStore2 autoreleased with no pool in place -
just leaking
2007-06-20 23:12:16.801 java[22345] *** _NSAutoreleaseNoPool(): Object
0x9032690 of class NSConcreteData autoreleased with no pool in place -
just leaking
2007-06-20 23:12:16.802 java[22345] *** _NSAutoreleaseNoPool(): Object
0x9032f40 of class NSCFArray autoreleased with no pool in place - just
leaking
2007-06-20 23:12:16.803 java[22345] *** _NSAutoreleaseNoPool(): Object
0x902c920 of class NSCFString autoreleased with no pool in place -
just leaking
2007-06-20 23:12:16.803 java[22345] *** _NSAutoreleaseNoPool(): Object
0x90333f0 of class NSPathStore2 autoreleased with no pool in place -
just leaking
Initted embedding
Bus error
[/code]

Actually, there are a lot more of those 'NSAutoReleaseNoPool() lines
before this.
If I replace the call to the component manager with a call to the
service manager, same thing
Is there anyone who knows what I am doing wrong here ?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.