Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, July 2007
Startup problems on Windows


Message 1 in thread

Hi!

I have recently released Moonlight|3D 0.1.4 and I am getting feedback that 
this version won't start on Windows XP. I am using the DLLs from the binary 
package Trolltech released. I checked that I have packaged all DLLs and that 
they are still identical to the original binaries. The exception that causes 
the failure seems to indicate that there is some problem with loading these 
DLLs:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.trolltech.qt.core.QtJambi_LibraryInitializer.__qt_initLibrary()V 
    at 
com.trolltech.qt.core.QtJambi_LibraryInitializer.__qt_initLibrary(Native 
Method) 
    at 
com.trolltech.qt.core.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:10) 
    at 
com.trolltech.qt.core.QAbstractFileEngineHandler.<clinit>(QAbstractFileEngineHandler.java:12) 
    at 
com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:24) 
    at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:29) 
    at ml.ML3D.<init>(Unknown Source) 
    at ml.ML3D.main(Unknown Source)

What troubles me is the fact that this problem only occurs on some Windows XP 
systems and I did not yet have a chance to find a pattern behind this. As far 
as I can tell the Jambi webstart demo is not affected and runs flawlessly. 
Can you give me some advice on what I could check for?

Regards,
Gregor

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 2 in thread

Gregor Mückl wrote:
> they are still identical to the original binaries. The exception that causes 
> the failure seems to indicate that there is some problem with loading these 
> DLLs:
>
>   
[...]
> What troubles me is the fact that this problem only occurs on some Windows XP 
> systems and I did not yet have a chance to find a pattern behind this. As far 
> as I can tell the Jambi webstart demo is not affected and runs flawlessly. 
> Can you give me some advice on what I could check for?
>   

Hi, Gregor.

A very good start would be to ask the people experiencing the problem to 
run the application manually from the command line and add a 
"-Dcom.trolltech.qt.verbose-loading=true" as a command line argument.

This will make Qt Jambi print out all kinds of information about the 
different stages in the library loading process. The exceptions/debug 
output posted to the console should give you some idea about which 
libraries are failing to load and why.

Hope this helps!

-- Eskil





Message 3 in thread

Gregor Mückl wrote:
> What troubles me is the fact that this problem only occurs on some Windows XP 
> systems and I did not yet have a chance to find a pattern behind this. As far 
> as I can tell the Jambi webstart demo is not affected and runs flawlessly. 
> Can you give me some advice on what I could check for?
>   

Hi again, Gregor.

I did some more poking around, and I think I know what your problem is. 
I'm guessing that the machines where this does *not* fail have either 
cygwin or mingw installed in their default path. By removing cygwin from 
my path, I can reproduce the problem.

The problem is that, while Qt Jambi manages to find out which libraries 
it needs by itself to a great deal, the system specific libraries that 
it depends on have to be specified manually.

For the open source version, the system specific library is mingwm10.dll 
which is the run time for g++. Since you are using Qt Jambi's loading 
mechanism in your startup script, and this library is not in the path on 
the machine where you are running the application, Windows is 
discovering that the Qt Jambi libs depends on it, but that it cannot 
find it.

The solution is to tell Qt Jambi to preload this library. This can be 
done either by adding the following option to the command line:

    -Dcom.trolltech.qt.systemlibraries=mingwm10.dll

(if you need more the names can be separated with the ordinary path 
separator of the platform, thus ; on Windows)

The other way is by adding a file called "qt_system_libs" in the root of 
the class path (so it can be found as a Java resource.) Put the 
libraries in the file, one library per line. They will be loaded on 
startup in the order specified.

Note that you cannot combine these two methods, you have to choose one. :-)

Hopefully this will solve the problem. Good luck!

-- Eskil