[Kde-bindings] Qyoto on Windows: AccessViolationException on startup

Hugo Wood hx4.5 at free.fr
Fri Jan 28 14:07:54 UTC 2011


Hello,

I have been trying to compile and run Qyoto on Windows. I have manage to compile qyoto.dll and qt-dotnet.dll along with their smoke dependencies, using Visual Studio 2008 and 2010. 
I had to comment out some parts of the code dealing with QAccessibleBridgePlugin and QAccessibleBridgeFactory in smokeqt and some parts dealing with QDBus in qyoto, to avoid undefined reference linking errors. If I understood well, those parts of Qt are not used on Windows so they do not exist in the binaries. Am I right? I also had to do minor modifications to CMake files and Visual Studio project files generated by them. For example, the compiler was set by default to the MS C# 2.0 compiler, which cannot compile qt-dotnet because it uses extension methods (C# 3.5). Changing the CMAKE_CSharp_COMPILER did not work. I edited qt-dotnet.vcxproj by hand.
I am saying all this so that if I did something I shouldn’t have someone can tell me. I had no experience with CMake or Qt internals before this, so I am trying stuff a bit blindly.

So as I said I now have qyoto.dll, qt-dotnet.dll, smokebase.dll, and a dozen smokeqt*.dll. I wrote a small program to test the library:

static int Main(string[] args)
{
  new QApplication(args);
  return QApplication.Exec();
}

The QApplication contructor ultimatly calls the native method CallSmokeMethod, which in turn raises an AccessViolationException. I’m kind of stuck. Prior messages in this mailing list about this exception refer to old qyoto code that has been fixed already. Could someone help me?

Tools I am using:
- Windows 7 x64
- Visual Studio 2010 (also tried with 2008)
- CMake 2.8
- Qt 4.7.1 VS2008
- latest source code from qyoto, smokeqt and smokegen git repositories

The trace (with some French but I am sure no one will bother :)):

Exception non gérée: System.AccessViolationException: Tentative de lecture ou d'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est endommagée.
   … Qyoto.SmokeInvocation.CallSmokeMethod(IntPtr smoke, Int32 methodId, IntPtr target, IntPtr sp, Int32 items)
   … Qyoto.SmokeInvocation.Invoke(String mungedName, String signature, Type returnType, Object[] args)
   … Qyoto.QApplication..ctor(String[] argv)
   … ConsoleApplication1.Program.Main(String[] args) dans C:\...\Program.cs:ligne 12

Hugo Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20110128/e2334d4f/attachment.html>


More information about the Kde-bindings mailing list