Open yuntan opened 9 years ago
I debugged the program by liteide debugger and finally got the cause of this problem. SIGSEGV is occued at https://github.com/go-qml/qml/blob/1116cb9cd8dee23f8d444ded354eb53122739f99/cpp/capi.cpp#L51 .
I tried to use Go's os.Args as argc, argv and it resolved this problem. Please see https://github.com/yuntan/qml/commit/e4ec67dadf1fcd1e8fcfe95ff62835151c42e7e6 .
I can confirm this fix also properly worked for me. Could this be merged into master ?
Thanks for these details. Taking over Go's argv is not the proper fix as it would create problems when you do want to use arguments yourself, but I will have a look at it and see what the proper fix is.
Hi there,
I just ran in the same issue after not using go-qml in a while and yuntan's fix worked for me as well. Hoping for something in the official repo as that would be easier to distribute :)
Go 1.4, Qt 5.4.0, Arch Linux 64bit
I installed qml by
go get gopkg.in/qml.v1
.When I run example code (ex. control/gallery) by
go run gallery.go
, I got message and application crashed.I removed static library by
rm -rf $GOPATH/pkg/linux_amd64/gopkg.in/qml.v1*
and re-run but the problem still happen.