Comments (3)
The commit message for the fix is misleading. binary.BigEndian.Uint64 will fail on index out of bounds because the byte slice isn't guaranteed to be 8 bytes long when idm.Outage flags is empty.
The new code will always succeed even if idm.Outage contains no data.
from rtlamr-collect.
29.10.19 22:11:35 (-0300) panic: runtime error: index out of range
29.10.19 22:11:35 (-0300) goroutine 1 [running]:
29.10.19 22:11:35 (-0300) encoding/binary.bigEndian.Uint64(...)
29.10.19 22:11:35 (-0300) /usr/local/go/src/encoding/binary/binary.go:124
29.10.19 22:11:35 (-0300) main.IDM.AddPoints(0x1074aa0, 0x8, 0x19dd4b4, 0x5f03ab, 0x1068640, 0x1b, 0x1c, 0x0, 0x0, 0x0, ...)
29.10.19 22:11:35 (-0300) /go/pkg/mod/github.com/bemasher/rtlamr-collect/main.go:78 +0x908
29.10.19 22:11:35 (-0300) main.main()
29.10.19 22:11:35 (-0300) /go/pkg/mod/github.com/bemasher/rtlamr-collect/main.go:426 +0x5fc
from rtlamr-collect.
Thanks for the Update. Tested and it worked after the change!
from rtlamr-collect.
Related Issues (20)
- Using 2 instances on rtlamr-collect HOT 1
- Error parsing encapsulated message HOT 4
- invalid memory address HOT 2
- main.go:427: json unmarshal: json: Unmarshal(nil) HOT 6
- 404 Error HOT 5
- InfluxDB 2 support HOT 3
- Error Message Install HOT 1
- Print collected data to stdout HOT 5
- stumped on "COLLECT_INFLUXDB_TOKEN" undefined HOT 4
- Diagnosing Influx issues HOT 2
- Invalid character error HOT 4
- Can you give us some info on how to set up influxdb? HOT 1
- Where to set envinronment variables (Using Windows) HOT 2
- Depeding on grafana zoom level, water meter gallons used is different HOT 2
- unexpected end of JSON input main.main invalid character C /f E M C E . HOT 3
- Unable to build / install HOT 2
- endpoint_type varying for R900 water meter
- Go install instructions fail
- Grafana Dashboards HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtlamr-collect.