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

How should disconnect / reconnect be handled? #106

Open
erwin opened this issue Jul 14, 2022 · 0 comments
Open

How should disconnect / reconnect be handled? #106

erwin opened this issue Jul 14, 2022 · 0 comments

Comments

@erwin
Copy link

erwin commented Jul 14, 2022

When I power off the hub that my deckmaster is connected to, deckmaster will crash. Not every crash results in the same error though.

When keeping the hub off for a long time, I got this SERV:

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

goroutine 1 [running]:
github.com/karalabe/hid.(*Device).SendFeatureReport(0x0, {0xc0005082a0, 0x20, 0x20})
        /home/erwin/go/pkg/mod/github.com/karalabe/hid@v1.0.1-0.20190806082151-9c14560f9ee8/hid_enabled.go:211 +0x47
github.com/muesli/streamdeck.Device.sendFeatureReport(...)
        /home/erwin/go/pkg/mod/github.com/muesli/streamdeck@v0.3.0/streamdeck.go:475
github.com/muesli/streamdeck.Device.Reset({{0xc00002a240, 0xc}, {0xc00002a2e0, 0xc}, 0x5, 0x3, 0xf, 0x48, 0x7c, 0x10, ...})
        /home/erwin/go/pkg/mod/github.com/muesli/streamdeck@v0.3.0/streamdeck.go:233 +0x92
main.closeDevice(0xc0000b0b60)
        /home/erwin/SourceInstall/deckmaster/main.go:172 +0x98
main.run()
        /home/erwin/SourceInstall/deckmaster/main.go:285 +0x642
main.main()
        /home/erwin/SourceInstall/deckmaster/main.go:308 +0x1a5

Yet when turning off more quickly I got:

Unable to reset Stream Deck
error: cannot write image page 0 of 4 (3660 image bytes) 1024 bytes: hidapi: unknown failure

Of course I can work can work around by not disconnecting :-)

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