panic: runtime error: slice bounds out of range [6:1]
fedorlitau opened this issue · 0 comments
fedorlitau commented
This bug occurs some times more or less randomly producing the following message:
panic: runtime error: slice bounds out of range [6:1]
goroutine 53 [running]:in:
github.com/nakabonne/tstorage.(*memoryMetric).selectPoints(0xc0001ba7e0, 0x16a06b537e57044c, 0x16a06b5a7a7ab04c, 0x0, 0x0, 0x0)
/root/go/pkg/mod/github.com/nakabonne/tstorage@v0.2.0/memory_partition.go:232 +0x27b
github.com/nakabonne/tstorage.(*memoryPartition).selectDataPoints(0xc000132200, 0x82dbf7, 0x7, 0x0, 0x0, 0x0, 0x16a06b537e57044c, 0x16a06b5a7a7ab04c, 0x449a4c, 0xc000092238, ...)
/root/go/pkg/mod/github.com/nakabonne/tstorage@v0.2.0/memory_partition.go:124 +0x9e
github.com/nakabonne/tstorage.(*storage).Select(0xc000132180, 0x82dbf7, 0x7, 0x0, 0x0, 0x0, 0x16a06b537e57044c, 0x16a06b5a7a7ab04c, 0x46a77b, 0x77b3455e6fa8, ...)
/root/go/pkg/mod/github.com/nakabonne/tstorage@v0.2.0/storage.go:324 +0x262
github.com/nakabonne/ali/storage.(*storage).Select(0xc00012e260, 0x82dbf7, 0x7, 0xc043adf3db12ae4c, 0x323d8539, 0xb456e0, 0xc043adfb5b12ae4c, 0x72e613139, 0xb456e0, 0x0, ...)
/opt/ali/storage/storage.go:116 +0x105
github.com/nakabonne/ali/gui.(*drawer).redrawCharts(0xc0001c6480, 0x8a5ab8, 0xc00007e000)
/opt/ali/gui/drawer.go:53 +0x262
created by github.com/nakabonne/ali/gui.attack
/opt/ali/gui/keybinds.go:55 +0x9d
I have opened a PR in the underlying library to fix it - see nakabonne/tstorage#30