Bug 324061 - QWidget.WinId property in Qyoto throws AccessViolationException
Summary: QWidget.WinId property in Qyoto throws AccessViolationException
Status: RESOLVED LATER
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: 4.9
Platform: unspecified Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 10:51 UTC by num.ani.cloud
Modified: 2013-08-29 05:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description num.ani.cloud 2013-08-26 10:51:24 UTC
(I'm Japanese, and I hope you to tolerate poor English.)

Hi, I'm using Qyoto. I tried to get window handle of instance of my widget class inherited from QWidget, but when I access QWidget.WinId Property it threw AccessViolationException.
My program is as follows:

using QtGui;

class Program
{
	public static void Main( string[] args )
	{
		var app = new QApplication( args );
		var window = new MyWidget( null );
		window.Show();

		ulong id = window.WinId.Value;	// The exception was thrown from here

		QApplication.Exec();
	}
}

class MyWidget : QWidget
{
	public MyWidget( QWidget parent )
		: base( parent )
	{
	}
}

Is this a bug made by Qyoto? Or Is there something mistake in my program?

Reproducible: Always

Steps to Reproduce:
1. Set up project for using Qyoto.
2. Put source code into project and run.
Actual Results:  
The exception thrown from access for window.WinId
Comment 1 Dimitar Dobrev 2013-08-26 11:02:17 UTC
    Could you please specify on which OS you get this error?


________________________________
 From: "num.ani.cloud@gmail.com" <num.ani.cloud@gmail.com>
To: kde-bindings@kde.org 
Sent: Monday, August 26, 2013 1:51 PM
Subject: [Kde-bindings] [bindings] [Bug 324061] New: QWidget.WinId property in Qyoto throws AccessViolationException
 

https://bugs.kde.org/show_bug.cgi?id=324061

            Bug ID: 324061
           Summary: QWidget.WinId property in Qyoto throws
                    AccessViolationException
    Classification: Unclassified
           Product: bindings
           Version: 4.9
          Platform: unspecified
                OS: MS Windows
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kde-bindings@kde.org
          Reporter: num.ani.cloud@gmail.com

(I'm Japanese, and I hope you to tolerate poor English.)

Hi, I'm using Qyoto. I tried to get window handle of instance of my widget
class inherited from QWidget, but when I access QWidget.WinId Property it threw
AccessViolationException.
My program is as follows:

using QtGui;

class Program
{
    public static void Main( string[] args )
    {
        var app = new QApplication( args );
        var window = new MyWidget( null );
        window.Show();

        ulong id = window.WinId.Value;    // The exception was thrown from here

        QApplication.Exec();
    }
}

class MyWidget : QWidget
{
    public MyWidget( QWidget parent )
        : base( parent )
    {
    }
}

Is this a bug made by Qyoto? Or Is there something mistake in my program?

Reproducible: Always

Steps to Reproduce:
1. Set up project for using Qyoto.
2. Put source code into project and run.
Actual Results:  
The exception thrown from access for window.WinId
Comment 2 num.ani.cloud 2013-08-26 11:12:15 UTC
Thank you for reply. My OS is Windows7.
Comment 3 num.ani.cloud 2013-08-26 14:10:34 UTC
Additional information:
I'm using Qyoto version 4.0.7, and using Qt version 4.8.5.
Comment 4 num.ani.cloud 2013-08-27 08:54:54 UTC
Additional information:

I installed Qt by following steps:
1. Download the "Qt libraries 4.8.5 for Windows(minGW 4.4, 317 MB)" from http://qt-project.org/downloads.
2. Run the downloaded installer. I selected C:/Qt/4.8.5/, for install.
   I saw following error message:
   "There is a problem with your MinGW installation: The installer could not find a valid C:\MinGW\include\w32api.h (Only versions with W32API 3.13 are supported) Do you still want to continue? (Your installation may not work)"
   However, some sites(japanese) I referenced said that it's OK to ignore, so I ignored this error. I don't know what MinGW version is. Maybe version of w32api.h is 3.17.

I installed Qyoto by following steps:
1. Download Qyoto for Windows from http://techbase.kde.org/Development/Languages/Qyoto.
2. Expand the downloaded File.

I configured my project to reference Qyoto and Qt by following steps:
1. Copy following files to a directory in which my application is:
	[Qt folder]/[Version]/bin/libgcc_s_dw2-1.dll
	[Qt folder]/[Version]/bin/mingwm10.dll
	[Qt folder]/[Version]/bin/QtCore4.dll
	[Qt folder]/[Version]/bin/QtGui4.dll
	[Qyoto folder]/bin/qyoto-qtcore-native.dll
	[Qyoto folder]/bin/qyoto-qtgui-native.dll
	[Qyoto folder]/bin/smokebase.dll
	[Qyoto folder]/bin/smokeqtcore.dll
	[Qyoto folder]/bin/smokeqtgui.dll
3. Add references to following files to my project:
	[Qyoto folder]/lib/qyoto-qtcore.dll
	[Qyoto folder]/lib/qyoto-qtgui.dll
4. Write a program and run it.
Comment 5 Dimitar Dobrev 2013-08-27 09:29:59 UTC
    I have reproduced the issue, will try to fix it as soon as possible. My work on Qyoto these days is on a new version (not published yet) that is not based on SMOKE but I estimate about two months from now until completion. Soto me it's only maintenance of an old version but I'll do my best to fix this issue nevertheless.

    Dimitar Dobrev



________________________________
 From: "num.ani.cloud@gmail.com" <num.ani.cloud@gmail.com>
To: kde-bindings@kde.org 
Sent: Tuesday, August 27, 2013 11:54 AM
Subject: [Kde-bindings] [bindings] [Bug 324061] QWidget.WinId property in Qyoto throws AccessViolationException
 

https://bugs.kde.org/show_bug.cgi?id=324061

--- Comment #4 from num.ani.cloud@gmail.com ---
Additional information:

I installed Qt by following steps:
1. Download the "Qt libraries 4.8.5 for Windows(minGW 4.4, 317 MB)" from
http://qt-project.org/downloads.
2. Run the downloaded installer. I selected C:/Qt/4.8.5/, for install.
   I saw following error message:
   "There is a problem with your MinGW installation: The installer could not
find a valid C:\MinGW\include\w32api.h (Only versions with W32API 3.13 are
supported) Do you still want to continue? (Your installation may not work)"
   However, some sites(japanese) I referenced said that it's OK to ignore, so I
ignored this error. I don't know what MinGW version is. Maybe version of
w32api.h is 3.17.

I installed Qyoto by following steps:
1. Download Qyoto for Windows from
http://techbase.kde.org/Development/Languages/Qyoto.
2. Expand the downloaded File.

I configured my project to reference Qyoto and Qt by following steps:
1. Copy following files to a directory in which my application is:
    [Qt folder]/[Version]/bin/libgcc_s_dw2-1.dll
    [Qt folder]/[Version]/bin/mingwm10.dll
    [Qt folder]/[Version]/bin/QtCore4.dll
    [Qt folder]/[Version]/bin/QtGui4.dll
    [Qyoto folder]/bin/qyoto-qtcore-native.dll
    [Qyoto folder]/bin/qyoto-qtgui-native.dll
    [Qyoto folder]/bin/smokebase.dll
    [Qyoto folder]/bin/smokeqtcore.dll
    [Qyoto folder]/bin/smokeqtgui.dll
3. Add references to following files to my project:
    [Qyoto folder]/lib/qyoto-qtcore.dll
    [Qyoto folder]/lib/qyoto-qtgui.dll
4. Write a program and run it.
Comment 6 num.ani.cloud 2013-08-27 10:28:06 UTC
Thank you for the reply. I'm developing a game engine. I'll adopt Qyoto as GUI framework for editors such as 3D model editor, animation editor. Which do you think that I should wait you to release new version or fix a bug? Can I get a window handle on Windows OS and a display on X11 for DirectX and OpenGL in new version. Do you release new version after two months? If I adopt new version for the game engine, I contribute new version.
Comment 7 Dimitar Dobrev 2013-08-27 12:52:30 UTC
    Yes, you'll be able to do that with the new version. The WinId property will work properly and you'll be able to use it.
    If you can wait for the new version in 2 months, it'd be much more convenient to me. It will be much more reliable and besides, should you encounter any problems with it, I'll be my pleasure to fix them. However, if you are in a hurry, I'll see if I can patch the old version up but I cannot give you any promises.


________________________________
 From: "num.ani.cloud@gmail.com" <num.ani.cloud@gmail.com>
To: kde-bindings@kde.org 
Sent: Tuesday, August 27, 2013 1:28 PM
Subject: [Kde-bindings] [bindings] [Bug 324061] QWidget.WinId property in Qyoto throws AccessViolationException
 

https://bugs.kde.org/show_bug.cgi?id=324061

--- Comment #6 from num.ani.cloud@gmail.com ---
Thank you for the reply. I'm developing a game engine. I'll adopt Qyoto as GUI
framework for editors such as 3D model editor, animation editor. Which do you
think that I should wait you to release new version or fix a bug? Can I get a
window handle on Windows OS and a display on X11 for DirectX and OpenGL in new
version. Do you release new version after two months? If I adopt new version
for the game engine, I contribute new version.
Comment 8 num.ani.cloud 2013-08-28 10:15:54 UTC
I look forward to release new version. I have three questions about new version. Do any functions in new version resemble those in old version, or these  are renewed? Is new version is based on Qt5? What do you use a wrapper tool instead of SMOKE for new version? Thank you.
Comment 9 Dimitar Dobrev 2013-08-28 15:52:57 UTC
    1. The functions will be the same, that is, the API will be compatible. Some functions may have different (that is, better mapped) parameter or returntypes but they will be a small minority;
    2. The new bindings can be based on any Qt version. In particular, the binaries I will upload will be indeed based on Qt 5. In case you need an older version, just contact me and we can work that out too;
    3. I use this - https://github.com/mono/CppSharp.



________________________________
 From: "num.ani.cloud@gmail.com" <num.ani.cloud@gmail.com>
To: kde-bindings@kde.org 
Sent: Wednesday, August 28, 2013 1:15 PM
Subject: [Kde-bindings] [bindings] [Bug 324061] QWidget.WinId property in Qyoto throws AccessViolationException
 

https://bugs.kde.org/show_bug.cgi?id=324061

--- Comment #8 from num.ani.cloud@gmail.com ---
I look forward to release new version. I have three questions about new
version. Do any functions in new version resemble those in old version, or
these  are renewed? Is new version is based on Qt5? What do you use a wrapper
tool instead of SMOKE for new version? Thank you.
Comment 10 num.ani.cloud 2013-08-29 05:25:09 UTC
Thank you for your answer!