zgwit / iot-master

物联大师是开源免费的物联网云平台,集成了标准Modbus、电力、水文和主流PLC等多种协议,支持数据采集、公式计算、异常报警、Web组态等功能,适用于大部分物联网和工业互联网应用场景。
https://iot-master.com
GNU General Public License v3.0
694 stars 157 forks source link

新建设备,程序崩溃 #11

Closed zgwit closed 2 years ago

zgwit commented 2 years ago

发生异常: panic "runtime error: invalid memory address or nil pointer dereference" Stack: 4 0x0000000000a90708 in github.com/zgwit/iot-master/master.(Device).BindAdapter at /home/moon/go/src/iot-master/master/device.go:88 5 0x0000000000a91e19 in github.com/zgwit/iot-master/master.(Device).Start at /home/moon/go/src/iot-master/master/device.go:198 6 0x0000000000a955ef in github.com/zgwit/iot-master/master.LoadDevice at /home/moon/go/src/iot-master/master/master.go:58 7 0x0000000000c6182a in github.com/zgwit/iot-master/web/api.deviceUpdate.func1 at /home/moon/go/src/iot-master/web/api/device.go:171

zgwit commented 2 years ago

起因是地址输入错误,代码未判断解析失败

zgwit commented 2 years ago

已经解决