go-qml / qml

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

Crash On Windows using qtx64 5.4.0 #142

Closed fire closed 9 years ago

fire commented 9 years ago

http://sourceforge.net/projects/qtx64/files/qt-x64/5.4.0/mingw-4.9/seh/qt-5.4.0-x64-mingw492r0-seh-opengl.exe/download

I've been using go1.4, qt 5.4.0 to explore this library and it crashes on the example programs.

Any idea what the problem is?

C:\Users\fire\go\src\gopkg.in\qml.v1\examples\controls\gallery>gallery.exe
Exception 0xc0000005 0x1 0x0 0x7fffb6f85ed9
PC=0x7fffb6f85ed9
signal arrived during cgo execution

gopkg.in/qml%2ev1._Cfunc_idleTimerInit(0x693ce4)
        C:/Users/fire/go/src/gopkg.in/qml.v1/:191 +0x4c
gopkg.in/qml%2ev1.Run(0x5ab078, 0x0, 0x0)
        C:/Users/fire/go/src/gopkg.in/qml.v1/bridge.go:56 +0x141
main.main()
        C:/Users/fire/go/src/gopkg.in/qml.v1/examples/controls/gallery/gallery.g
o:10 +0x39

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        c:/go/src/runtime/asm_amd64.s:2232 +0x1
rax     0x0
rbx     0x23fe48
rcx     0xece672284a970000
rdx     0x0
rdi     0xffffffffffffffff
rsi     0x689060
rbp     0x689420
rsp     0x23fdf0
r8      0x23f3e8
r9      0x0
r10     0x0
r11     0x23f830
r12     0xb
r13     0x0
r14     0x23fe40
r15     0x4cf8b0
rip     0x7fffb6f85ed9
rflags  0x7fff00010286
cs      0x33
fs      0x53
gs      0x2b
fire commented 9 years ago

https://github.com/noliar/qml/commit/352842b73ada0fc32d94cf91e75541e590675f82 Fixes this.

kdar commented 9 years ago

Can this be merged? Fixed my issues too.

neclepsio commented 9 years ago

It fixed my issue too (my application still doesn't work for #19).

neclepsio commented 9 years ago

@niemeyer, can we know why you are not merging this pull request? Are there any side-effects we should be aware? Thank you.

niemeyer commented 9 years ago

@neclepsio This is an external branch, not a pull request. It also seems to indicate a fundamental bug in the support for the C++ language. This will definitely not be the only occurrence, and it doesn't make sense to replace perfectly valid code with arbitrary workarounds until a given broken environment works. We need to know why the given environment is broken in the first place, and fix that.

neclepsio commented 9 years ago

@niemeyer thank you, I did not understand it was an environment problem when I asked. I think it's the same as #142. I opened https://github.com/golang/go/issues/10023, which seems to me the explanation of both.

niemeyer commented 9 years ago

I suspect you meant #19? I'm closing this one on the same basis: From the looks of it, it seems that there are major bugs in the C++ support in that environment. I'm tentatively closing this bug on qml and will follow up on golang/go#10023. If there is a reason to think go-qml is at fault somehow, please feel free to reopen this.

neclepsio commented 9 years ago

Yes, I meant #19.

neclepsio commented 8 years ago

Using Go 1.5 solves this. Please update documents to state Go 1.5 is required under Windows.