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

Question about the Raspberry pi example #22

Closed
gilles537 opened this issue Jun 13, 2019 · 1 comment · Fixed by #24
Closed

Question about the Raspberry pi example #22

gilles537 opened this issue Jun 13, 2019 · 1 comment · Fixed by #24

Comments

@gilles537
Copy link

gilles537 commented Jun 13, 2019

I have followed the guide and now i have the deployments running but the pod keeps crashing. When i check the actual container the logs says:

I0613 14:02:34.782924 1 light_mapper.go:168] Changing the state of the device to online
I0613 14:02:34.784542 1 light_mapper.go:242] Watching on the device twin values for device: led-light-instance-01
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x66e450]

goroutine 1 [running]:
main.equateTwinValue(0x0, 0x0, 0x0, 0x400007d2f0)
/var/opt/godir/src/github.com/kubeedge/examples/led-raspberrypi/light_mapper.go:248 +0x198
main.main()
/var/opt/godir/src/github.com/kubeedge/examples/led-raspberrypi/light_mapper.go:280 +0x16c

@sujithsimon22
Copy link
Member

@gilles537 This problem is caused since the desired value has not been set yet. We have to set the desired value for "power-status" in the device instance
I'll raise a PR for the error handling here & edit the device instance placed at "led-raspberrypi/sample-crds/led-light-device-instance.yaml" to include the desired value

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

Successfully merging a pull request may close this issue.

2 participants