-
Notifications
You must be signed in to change notification settings - Fork 188
go-qml is broken under Go 1.6 #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Panic can be suppressed by setting the environment variable GODEBUG=cgocheck=0 |
I've been able to put some time into this issue. You can go check commit at 826359a. I've been able to compile and run the customtype example. I'll be cleaning thing up and adding some more testing. |
More progress today: Refactor: connectedFunction, TypeSpec, and valueFold all to support cgo Go pointer issue. I was able to compile and run the gopher example. latest commit at 0309d2d |
Any chance of getting this merged in? |
@SjB do you think your changes have addressed all the problems? This is a blocking issue for me |
@vially The answer to this problem is documented at the bottom of this readme. Its an easy fix: https://golog.co/blog/article/Using_Go_with_QML_part_1 |
@amlwwalker that is not a "fix", that simply disables the check... |
@immesys I was able to run all the example except for snapweb. But the error with that example is a very different issue. |
@SjB today I encountered some problems with your fix. From qml I call a go function which returns a go type. If I then try pass that go type to another go function (inside qml) it panics with "cannot find fold go reference". The same access pattern works fine without the fix and cgocheck=0. Apart from that, everything has been working fine. Do you think this issue can be fixed? |
@immesys can you send me some codes that would replicated this error. |
Would love to see this fixed. Any ETA @SjB / @immesys? Can we get the example? @immesys, perhaps this is related to the new cgo rules? (e.g. don't pass Go-allocated pointers to memory containing other Go-allocated pointers through C functions) |
Hi, sorry @SjB, @binary132 I did not make a reproducer earlier, I've been pretty busy. Here it is: https://github.com/immesys/go-qml-fix-problem |
@SjB Your branch is working fine for me here: https://github.com/cortex/gopass Thanks! I hope we can get this merged soon! |
Did someone try my reproducer? |
@SjB Works great for me - please submit a PR! |
@SjB @larryprice @cortex the branch does not work completely yet. Take a look here: https://github.com/immesys/go-qml-fix-problem It cannot handle go -> qml -> go, whereas that used to work fine. |
Or, you could open the PR against @SjB's fork containing your breaking test. That way he can fix the breakage in his fork before opening the PR against this repo. |
Thanks @immesys for sending me your codes. I finally had a few hours to look into this. good news is that I have found and fixed the bug. We can now use a Go struct in a qml component script. Please test away and let me know if I should do a pull request. |
@SjB I have a reproducer for another crash. As soon as the mouse is moved on the MouseArea, it crashes. The number for the unsupported data type is always different. Could you please take a look?
|
Thanks @neclepsio, for finding this bug, you can find the fix on my repo here f9db098 |
@SjB Are there any known bugs on your branch or could it be used in production? This repo is hopelessly dead, I assume there's no more funding by Canonical. |
I would advise against production use. I eventually moved away because of numerous problems with qml types to go code and vice versa. It ends up being very time consuming to debug and work around. |
@immesys Moved to any other package, language and/or toolkit? |
Moved to C++/QML talking to go code over RPC |
@mixedCase, I use @SjB's branch in production with no problem. |
Closing due to inactivity. Also, it seems unlikely this will get fixed since the project seems unmaintained at this point. |
已收到您的邮件!蒋
|
Running the gopher example fails with:
panic: runtime error: cgo argument has Go pointer to Go pointer
.Most probably this has to do with the cgo changes present in Go 1.6
The text was updated successfully, but these errors were encountered: