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

panic when device is unplugged during operations #2

Open
marshallbrekka opened this issue Dec 15, 2017 · 2 comments
Open

panic when device is unplugged during operations #2

marshallbrekka opened this issue Dec 15, 2017 · 2 comments

Comments

@marshallbrekka
Copy link
Owner

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4a6f154]

goroutine 1 [running]:
vendor/github.com/marshallbrekka/go%2ehid.(*Device).Write(0x0, 0xc4205bb770, 0x41, 0x41, 0x4, 0xc42014e001, 0xc420755fd0)
	github.com/marshallbrekka/go.hid/hid.go:364 +0x34
github.com/marshallbrekka/go-u2fhost/hid.(*RawHidDevice).Write(0xc4202c9a50, 0xc4205bb770, 0x41, 0x41, 0x5, 0x5, 0xc4205bb770)
	github.com/wearefair/fair-cli/vendor/github.com/marshallbrekka/go-u2fhost/hid/wrapper.go:36 +0x4d
github.com/marshallbrekka/go-u2fhost/hid.sendRequest(0x5493c20, 0xc4202c9a50, 0x3ffffffff, 0xc42014e120, 0x8a, 0x8a, 0x8a, 0xc42014e120)
	github.com/marshallbrekka/go-u2fhost/hid/hid.go:138 +0x357
@marshallbrekka
Copy link
Owner Author

Seems like this is something that could/should be handled at the go.hid layer, since all of the device methods can return an error.

@marshallbrekka
Copy link
Owner Author

This is fixed by migrating to karalabe/hid

samhanes-fs pushed a commit to samhanes-fs/go-u2fhost that referenced this issue Aug 16, 2019
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

1 participant