go-qml / qml

QML support for the Go language
Other
1.96k stars 187 forks source link

Crash on Windows with Go 1.3 #78

Open neclepsio opened 10 years ago

neclepsio commented 10 years ago

When compiling qml.v0 using Go 1.3 on Windows (32 bit) the resulting binary crashes when launched without any explaination. The very same environment, but with Go 1.2, produces working binaries. This is true also for examples.

maran commented 10 years ago

Could this be a duplicate of #76?

neclepsio commented 10 years ago

It isn't. The problem is still present in qml.v1.

neclepsio commented 10 years ago

With my current setup and 1.3.1 it doesn't crash anymore. I cannot tell what solved these crashes. Anyway, I still can't get it working but I'll open another issue if it is the case.

geraldstanje commented 10 years ago

it also crashes here. i tested it on windows 7, x32 with qt 5.3.2, mingw, golang 1.3 which version of qt are you using?

neclepsio commented 10 years ago

I'm using 5.3.1 and mingw on Windows 7 x64. Did you try a clean build, removing pkg directory? Il 06/ott/2014 11:13 "geraldstanje" notifications@github.com ha scritto:

it also crashes here. i tested it on windows 7, x32 with qt 5.3.2 and mingw which version of qt are you using?

— Reply to this email directly or view it on GitHub https://github.com/go-qml/qml/issues/78#issuecomment-57991798.

geraldstanje commented 10 years ago

yes i removed the go qml package from the pkg and src directory within my gopath...

im getting the same issue with golang 1.3.3: http://i.share.pho.to/004e61a2_o.png

i copied all dlls from C:\Qt\Qt5.3.2\5.3\mingw482_32\bin to the direcory of the executable, just to make sure i dont miss any dll...

any idea?

edit: i opend a new bug report, not sure if its the same issue: https://github.com/go-qml/qml/issues/109

geraldstanje commented 10 years ago

did you use mingw which comes with the qt installer?

neclepsio commented 10 years ago

This is my environment:

GOROOT=C:\Go QT_PATH=C:\Qt\Qt5.3.1\5.3\mingw482_32 MINGW_PATH=C:\MinGW GIT_PATH=C:\Git

CPATH=%QT_PATH%\include;%MINGW_PATH%\include; LIBRARY_PATH=%QT_PATH%\lib;%MINGW_PATH%\lib; PKG_CONFIG_PATH=%QT_PATH%\lib\pkgconfig;

PATH=%GOROOT%\bin;%QT_PATH%\bin;%MINGW_PATH%\bin;%GIT_PATH%\bin;%PATH%

On Mon, Oct 6, 2014 at 2:31 PM, geraldstanje notifications@github.com wrote:

did you use mingw which comes with the qt installer?

— Reply to this email directly or view it on GitHub https://github.com/go-qml/qml/issues/78#issuecomment-58010034.

neclepsio commented 10 years ago

Sorry, I've just retried on my Windows box (after developing on Linux for a while) and found out it crashes again. I didn't change anything, so I've no idea what happened.

geraldstanje commented 10 years ago

ok, good to know! did you open cmd using Qt 5.3 for Desktop (MinGW 4.8 32 bit) ?

geraldstanje commented 10 years ago

can you start the debugger, just to see if it crashes at the same place as here: https://github.com/go-qml/qml/issues/109 ?

niemeyer commented 10 years ago

Thanks for having a look at this issue.

neclepsio commented 10 years ago

No, it seems to be in C.applicationExec.

GDB output:

*stopped,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation fault",frame={addr="0x00000000",func="??",args=[]},thread-id="1",stopped-threads="all"
(gdb) 
>>> 10000021-var-delete var110000018^done,changelist=[{name="var1",in_scope="false",type_changed="false",has_more="0"}]
(gdb) 
10000019^done,variables=[]
(gdb) 
10000020^done,stack=[frame={level="0",addr="0x00000000",func="??"},frame={level="1",addr="0x004f43f0",func="packDataValue"},frame={level="2",addr="0x5472d428",func="??"},frame={level="3",addr="0x004f516b",func="objectFindChild"},frame={level="4",addr="0x0018cfc0",func="??"},frame={level="5",addr="0x004f11af",func="cgo_ce4a58f5aa4d_Cfunc_objectFindChild"},frame={level="6",addr="0x546d2d00",func="??"},frame={level="7",addr="0x00000000",func="??"}]
(gdb) 
10000021^done,ndeleted="3"
(gdb) 
geraldstanje commented 10 years ago

i added my gdb output as well...

jasondelponte commented 9 years ago

With Qt 5.1.1, MinGW 4.8 32 bit, GTK 2.24.10 32 bit, and go 1.3.3 32 bit on Windows 7 64 bit I'm, able to run the examples included in the project without crashes.

cookieo9 commented 9 years ago

GTK? Why do you need GTK to install qml?

Don't tell me it's for pkg-config...

On Tuesday, October 14, 2014, Jason Del Ponte notifications@github.com wrote:

With Qt 5.1.1, MinGW 4.8 32 bit, GTK 2.24.10 32 bit, and go 1.3.3 32 bit on Windows 7 64 bit I'm, able to run the examples included in the project without crashes.

— Reply to this email directly or view it on GitHub https://github.com/go-qml/qml/issues/78#issuecomment-59090785.

Carlos Castillo

jasondelponte commented 9 years ago

yeah it was for pkg-config, and libglib-2.0.0. I'm pretty new to qml and qt in general, but in order for the go get to work for me i needed to install pkg-config and libglib. gtk was the simplest place to get both of them, and what ever dependancies they had.

cookieo9 commented 9 years ago

There is a version of pkg-config (pkg-config-lite) that doesn't have any glib dependencies.

Also I'm considering writing a version of pkg-config in go, since the user of cgo packages on windows is assumed to have go get.

On Tuesday, October 14, 2014, Jason Del Ponte notifications@github.com wrote:

yeah it was for pkg-config, and libglib-2.0.0. I'm pretty new to qml and qt in general, but in order for the go get to work for me i needed to install pkg-config and libglib. gtk was the simplest place to get both of them, and what ever dependancies they had.

— Reply to this email directly or view it on GitHub https://github.com/go-qml/qml/issues/78#issuecomment-59091878.

Carlos Castillo

felixrabe commented 9 years ago

+1 for a Go pkg-config implementation! I was finding this issue while looking for a sane way to install pkg-config on Windows after following the instructions in the go-qml README, and I was contemplating the same. It's a shame that such a (relatively) simple and widely-used tool is not trivial to install.

felixrabe commented 9 years ago

See also #114.

felixrabe commented 9 years ago

Re pkg-config again: see https://pypi.python.org/pypi/pykg-config/1.3.0 for a Python re-implementation.

cookieo9 commented 9 years ago

So instead of needing to install GTK to build a QT based package, we will need to install Python to build a Go package? ;-)

On Sun, Oct 19, 2014 at 2:27 PM, Felix Rabe notifications@github.com wrote:

Re pkg-config again: see https://pypi.python.org/pypi/pykg-config/1.3.0 for a Python re-implementation.

— Reply to this email directly or view it on GitHub https://github.com/go-qml/qml/issues/78#issuecomment-59666362.

Carlos Castillo

felixrabe commented 9 years ago

No, I just stumbled over this other pkg-config implementation (with a similar motivation perhaps) and it might be interesting to look at / borrow from it.

felixrabe commented 9 years ago

Last pkg-config related comment here (big promise!): https://github.com/pkgconf/pkgconf might also be worth considering.

geraldstanje commented 9 years ago

@niemeyer could you add the following link to Windows section of the readme? pkg-config needs to be installed: http://win32builder.gnome.org/packages/3.6/pkg-config_0.28-1_win32.zip