Problem with latest version

15 views
Skip to first unread message

hsauro

unread,
Feb 28, 2009, 11:46:03 AM2/28/09
to qt4dotnet
Dear David Canar

We just tried the latest version of your qt4dotnet and discovered that
it appears to no longer work with Microsoft's .NET. The strange thing
is it works ok under Mono on Mac OSX and Windows. Is this a design
policy or a hiccup in the distribution?

The first exception I get on the Mice example is the following:

Herbert Sauro

System.TypeInitializationException was unhandled
Message="The type initializer for
'com.trolltech.qt.gui.QApplication' threw an exception."
Source="qtjambi-4.4.3"
TypeName="com.trolltech.qt.gui.QApplication"
StackTrace:
at com.trolltech.qt.gui.QApplication.initialize(String[] args)
at Test.CollidingMice.Main(String[] args) in C:\Documents and
Settings\hsauro\My Documents\Visual Studio 2005\Projects\TestQT\TestQT
\mice.cs:line 243
at System.AppDomain._nExecuteAssembly(Assembly assembly, String
[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.TypeInitializationException
Message="The type initializer for
'com.trolltech.qt.core.QCoreApplication' threw an exception."
Source="qtjambi-4.4.3"
TypeName="com.trolltech.qt.core.QCoreApplication"
StackTrace:
at com.trolltech.qt.core.QCoreApplication.__<clinit>()
at com.trolltech.qt.gui.QApplication..cctor()
InnerException: System.TypeInitializationException
Message="The type initializer for
'com.trolltech.qt.core.QObject' threw an exception."
Source="qtjambi-4.4.3"
TypeName="com.trolltech.qt.core.QObject"
StackTrace:
at com.trolltech.qt.core.QObject.__<clinit>()
at com.trolltech.qt.core.QCoreApplication..cctor()
InnerException: System.TypeInitializationException
Message="The type initializer for
'com.trolltech.qt.QtJambiObject' threw an exception."
Source="qtjambi-4.4.3"
TypeName="com.trolltech.qt.QtJambiObject"
StackTrace:
at com.trolltech.qt.QtJambiObject.__<clinit>()
at com.trolltech.qt.core.QObject..cctor()
InnerException: System.TypeInitializationException
Message="The type initializer for
'com.trolltech.qt.QtJambi_LibraryInitializer' threw an exception."
Source="qtjambi-4.4.3"

TypeName="com.trolltech.qt.QtJambi_LibraryInitializer"
StackTrace:
at
com.trolltech.qt.QtJambi_LibraryInitializer.init()
at com.trolltech.qt.QtJambiObject..cctor()
InnerException: java.lang.RuntimeException
Message="Loading library failed, progress
so far:\nNo 'qtjambi-deployment.xml' found in classpath, loading
libraries via 'java.library.path'\nLoading library: 'QtCore4.dll'...\n
- using 'java.library.path'\n - ok, path was: C:\\Documents and
Settings\\hsauro\\My Documents\\Visual Studio 2005\\Projects\\TestQT\
\TestQT\\bin\\Debug\\QtCore4.dll\nLoading library: 'qtjambi.dll'...\n
- using 'java.library.path'\n"
Source="qtjambi-4.4.3"
StackTrace:
at
com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary
(String )
at
com.trolltech.qt.internal.NativeLibraryManager.loadLibrary(String
library)
at
com.trolltech.qt.Utilities.loadJambiLibrary(String library)
at
com.trolltech.qt.QtJambi_LibraryInitializer..cctor()
InnerException:
java.lang.ExceptionInInitializerError
Message=""
Source="IKVM.OpenJDK.ClassLibrary"
StackTrace:
at
java.lang.ClassLoader.loadLibrary0(Class , File )
at
java.lang.ClassLoader.loadLibrary(Class , String , Boolean )
at java.lang.Runtime.load0
(Class , String )
at java.lang.Runtime.load(String
filename)
at
com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper
(String )
at
com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary
(String )
InnerException:


David Canar

unread,
Feb 28, 2009, 1:45:20 PM2/28/09
to qt4d...@googlegroups.com
Yes you are right. The ikvm is missing an important dll. Sorry about
that. I just uploaded binaries for MONO, .NET win32 and .NET win64.
Download the appropriate .zip for .NET, reference those new .dlls and
copy the ikvm-native.dll next to your executable or on your System32
folder. Please try them out and let me know if that fixes the problem.

Thank you!

David.

hsauro

unread,
Feb 28, 2009, 3:17:27 PM2/28/09
to qt4dotnet

I tested the win32 and that works fine, a colleague will probably test
the mono/OSX combination. Thanks for your efforts, this looks like a
very easy way to achieve cross-platform apps using C#.

I've one question, do you know if it would be possible to share
Winform controls and QT controls on the same form? I ask because we
use the ZedGraph control a lot (which works ok on all three platforms)
and wondered whether it would be possible to mix the two?

Herbert Sauro.

David Canar

unread,
Feb 28, 2009, 4:07:09 PM2/28/09
to qt4d...@googlegroups.com
On Sat, Feb 28, 2009 at 1:17 PM, hsauro <hsa...@gmail.com> wrote:
>
>
> I tested the win32 and that works fine, a colleague will probably test
> the mono/OSX combination. Thanks for your efforts, this looks like a
> very easy way to achieve cross-platform apps using C#.

Yes I think Qt is the best option for cross-platform apps. I really
like it especially because it gives a native look and feel in all
platforms.

>
> I've one question, do you know if it would be possible to share
> Winform controls and QT controls on the same form? I ask because we
> use the ZedGraph control a lot (which works ok on all three platforms)
> and wondered whether it would be possible to mix the two?

That is a really good question. I don't know. I haven't done any tests
trying to mix both of them. It would be very interesting to do some
research on that area. It would be perfect if it would be possible.
I'll do some tests and I'll let you know what I find.

David.
Reply all
Reply to author
Forward
0 new messages