GO 1.6 : panic: runtime error: cgo argument has Go pointer to Go pointer
jcnoir opened this issue · 7 comments
The app does not start with GO 1.6.
A workaround : GODEBUG=cgocheck=0 gopass
panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 1 [running, locked to thread]:
panic(0x5dc420, 0xc82000a1a0)
/usr/lib/go/src/runtime/panic.go:481 +0x3e6
gopkg.in/qml%2ev1._cgoCheckPointer0(0x5a3900, 0xc8200120a0, 0x0, 0x0, 0x0, 0x199)
??:0 +0x4d
gopkg.in/qml%2ev1.wrapGoValue(0xc82026c030, 0x5fb2c0, 0x914a60, 0xc82004bb01, 0x0)
/home/jcnoir/go/src/gopkg.in/qml.v1/bridge.go:254 +0x4dd
gopkg.in/qml%2ev1.packDataValue(0x5fb2c0, 0x914a60, 0xc82000a190, 0xc82026c030, 0xc820000101)
/home/jcnoir/go/src/gopkg.in/qml.v1/datatype.go:116 +0x2ae
gopkg.in/qml%2ev1.(*Context).SetVar.func1()
/home/jcnoir/go/src/gopkg.in/qml.v1/qml.go:300 +0x92
gopkg.in/qml%2ev1.hookIdleTimer()
/home/jcnoir/go/src/gopkg.in/qml.v1/bridge.go:190 +0x5d
gopkg.in/qml%2ev1._cgoexpwrap_0ae46c052b10_hookIdleTimer()
??:0 +0x14
gopkg.in/qml%2ev1._Cfunc_applicationExec()
??:0 +0x36
gopkg.in/qml%2ev1.Run(0x6598d8, 0x0, 0x0)
Yeah, this is a bit unfortunate This issue tracks upstream progress: go-qml/qml#170
I have pushed a new version with my own vendorized version of go-qml that supports Go 1.6, this produces a binary that works for me without special env variables (and with correct alt-tab icons). @jcnoir could you verify this works for you?
Thank you for this patch. I cloned the repo but I cannot build it : /main.go:170: undefined: qml.SetApplicationName
If I comment the line I can build but at runtime I got this:
panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 1 [running, locked to thread]:
panic(0x5dc440, 0xc82008a030)
/usr/lib/go/src/runtime/panic.go:481 +0x3e6
gopkg.in/qml%2ev1._cgoCheckPointer0(0x5a3920, 0xc820090000, 0x0, 0x0, 0x0, 0x199)
??:0 +0x4d
gopkg.in/qml%2ev1.wrapGoValue(0xc820088030, 0x5fbae0, 0x9152e0, 0xc820047b01, 0x0)
/home/jcnoir/go/src/gopkg.in/qml.v1/bridge.go:254 +0x4dd
gopkg.in/qml%2ev1.packDataValue(0x5fbae0, 0x9152e0, 0xc82008a020, 0xc820088030, 0xc820000301)
/home/jcnoir/go/src/gopkg.in/qml.v1/datatype.go:116 +0x2ae
gopkg.in/qml%2ev1.(*Context).SetVar.func1()
/home/jcnoir/go/src/gopkg.in/qml.v1/qml.go:300 +0x92
gopkg.in/qml%2ev1.hookIdleTimer()
/home/jcnoir/go/src/gopkg.in/qml.v1/bridge.go:190 +0x5d
gopkg.in/qml%2ev1._cgoexpwrap_0ae46c052b10_hookIdleTimer()
??:0 +0x14
gopkg.in/qml%2ev1._Cfunc_applicationExec()
??:0 +0x36
gopkg.in/qml%2ev1.Run(0x659958, 0x0, 0x0)
/home/jcnoir/go/src/gopkg.in/qml.v1/bridge.go:63 +0x16e
main.main()
/home/jcnoir/src/gopass/main.go:189 +0x24f
EDIT : I am not familiar with vendoring. I just build with go build. Do I have something else to do to build it correctly ? Thanks.
My fault, I forgot to push the updated submodule.
Vendoring is awesome, basically you just put whatever version of a library you want to build against in the folder vendor/, and that one is used instead of the upstream.
I have put my vendored go-qml in a git submodule, which means that the only thing special you should have to do is to do git submodule update
if you have previously cloned the repo. go build
should then work as normal. Re-cloning or go get
should also work.
It starts ! Thanks for your help.
The application starts without the previous panic. everything looks fine (ESC to quit ...) but it does not see any of my passwords. I can seen them with pass or qtpass. No error message, just an empty list. Any idea ?
@jcnoir Hmm, interesting. gopass looks for your passwords in ~/.password-store
usr, err := user.Current() if err != nil { log.Fatal(err) } passwords.Prefix = path.Join(usr.HomeDir, ".password-store")
If your passwords are there it should pick them up. Are you running gopass as your user? Are your pass passwords located in ~/.password-store ?