kubeedge / mappers-go

KubeEdge Device Mappers written in go
Apache License 2.0
45 stars 64 forks source link

After the modbus device connects to the mapper, the container of the mapper fails. #108

Closed NicoleLeeuu closed 1 year ago

NicoleLeeuu commented 1 year ago

The Modbus Mapper is running normally. After the device is delivered, the container of the mapper fails. 微信图片_20230731171819 View the mapper log. The command output is "panic: runtime error: invalid memory address or nil pointer dereference". 微信图片_20230731170900 Locate the problem. It was found that the payload in the Run() function, located in the mappers/modbus-dmi/device/twindata.go file, did not add the "Expected" data section. This results in an error when accessing msg.Twin.Expected when executing the parse.ConvMsgTwinToGrpc(msg.Twin) function. Is this a bug in the process of design and implementation? If so, please leave bugfix matters to me.

QiQi-OvO commented 1 year ago

Yes, this is a bug that has been fixed by two PRs(https://github.com/kubeedge/mappers-go/pull/99, https://github.com/kubeedge/mappers-go/pull/105), but they haven't been merged into the code repository yet.

cl2017 commented 1 year ago

Yes, this is a bug that has been fixed by two PRs(#99, #105), but they haven't been merged into the code repository yet.

Let's review these PRs again and merged it into master