Skip to content
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

Crash on start without password #1

Closed
christopherL91 opened this issue Dec 13, 2015 · 3 comments
Closed

Crash on start without password #1

christopherL91 opened this issue Dec 13, 2015 · 3 comments

Comments

@christopherL91
Copy link
Contributor

Running on mac osx 10.11.1 with go version 1.5

Crashing on start without any password:

panic: runtime error: index out of range

goroutine 1 [running, locked to thread]:
main.(*Passwords).Copy(0x42c58a0)
    /Users/Christopher/Development/Go/src/github.com/cortex/gopass/main.go:134 +0x327
reflect.Value.call(0x41bb220, 0x42c58a0, 0x513, 0x41cf920, 0x4, 0xc82004fba0, 0x0, 0xa, 0x0, 0x0, ...)
    /usr/local/Cellar/go/1.5.2/libexec/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0x41bb220, 0x42c58a0, 0x513, 0xc82004fba0, 0x0, 0xa, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.2/libexec/src/reflect/value.go:300 +0xb1
gopkg.in/qml%2ev1.hookGoValueCallMethod(0x632ae10, 0xc8200a2000, 0x2, 0x7fff5fbf8770)
    /Users/Christopher/Development/Go/src/gopkg.in/qml.v1/bridge.go:515 +0x425
gopkg.in/qml%2ev1._Cfunc_applicationExec()
    ??:0 +0x31
gopkg.in/qml%2ev1.Run(0x4218550, 0x0, 0x0)
    /Users/Christopher/Development/Go/src/gopkg.in/qml.v1/bridge.go:63 +0x16e
main.main()
    /Users/Christopher/Development/Go/src/github.com/cortex/gopass/main.go:180 +0x247

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/Cellar/go/1.5.2/libexec/src/runtime/asm_amd64.s:1721 +0x1

goroutine 20 [semacquire]:
sync.runtime_Semacquire(0xc8200a0274)
    /usr/local/Cellar/go/1.5.2/libexec/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200a0270)
    /usr/local/Cellar/go/1.5.2/libexec/src/sync/mutex.go:82 +0x1c4
gopkg.in/qml%2ev1.(*Window).Wait(0xc82000a0c0)
    /Users/Christopher/Development/Go/src/gopkg.in/qml.v1/qml.go:911 +0x9f
main.run(0x0, 0x0)
    /Users/Christopher/Development/Go/src/github.com/cortex/gopass/main.go:170 +0x122
gopkg.in/qml%2ev1.Run.func1(0xc820072120, 0x4218550)
    /Users/Christopher/Development/Go/src/gopkg.in/qml.v1/bridge.go:60 +0x2d
created by gopkg.in/qml%2ev1.Run
    /Users/Christopher/Development/Go/src/gopkg.in/qml.v1/bridge.go:62 +0x169

possibly a deadlock somewhere?

@cortex
Copy link
Owner

cortex commented Dec 13, 2015

No, it was just a normal missing bounds check. Fix is in master, try again with
go get -u github.com/cortex/gopass

I'm very happy to see this thing actually built on OSX =)! Would you mind sending a binary?

@christopherL91
Copy link
Contributor Author

Nice work 👍 Started using pass when I saw your post on Facebook ✌️ Sure thing, where do you want me to send it? You can always cross compile as well.

It would be nice to have everything static so that every asset is compiled into the binary. I started experimenting with go-bindata yesterday but I still haven't figured out what you can do to logo.svg file, since the QML package doesn't support giving external assets as an byte array. The qml file is okey to bundle with the binary if instead of giving it the file path giving it a byte array though the Asset function. Do you have any suggestions?

@cortex
Copy link
Owner

cortex commented Dec 14, 2015

I think it should be doable with https://godoc.org/gopkg.in/qml.v1#ResourcesPacker.AddString, but I haven't tested it I added a separate ticket about a full static build here: #3. PR:s are very welcome =)

Closing this issue since it seems to be working now.

@cortex cortex closed this as completed Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants