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

Validate that the speaker is in the config when addressing it directly. #5

Open
hilli opened this issue Feb 21, 2024 · 0 comments
Open

Comments

@hilli
Copy link
Owner

hilli commented Feb 21, 2024

 ~ % kefw2 -s 192.168.1.25 status        
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102a5a93c]

goroutine 1 [running]:
github.com/hilli/go-kef-w2/kefw2.(*KEFSpeaker).Source(0x14000031718?)
	github.com/hilli/go-kef-w2/kefw2/kefw2.go:143 +0x1c
github.com/hilli/go-kef-w2/cmd/kefw2/cmd.init.func18(0x102ffa360, {0x14000074a00?, 0x4?, 0x102b17e76?})
	github.com/hilli/go-kef-w2/cmd/kefw2/cmd/status.go:24 +0x34
github.com/spf13/cobra.(*Command).execute(0x102ffa360, {0x140000749e0, 0x2, 0x2})
	github.com/spf13/cobra@v1.8.0/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x102ff9ac0)
	github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/hilli/go-kef-w2/cmd/kefw2/cmd.Execute()
	github.com/hilli/go-kef-w2/cmd/kefw2/cmd/root.go:85 +0x58
main.main()

Or maybe just let it work without having the speaker in the config, but do some pre validation on the target before coughing up stack traces. Could be useful in any case, should the speakers have moved IP.

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