tesselslate / resetti

Minecraft multi-instance reset macro for speedrunning
GNU General Public License v3.0
15 stars 3 forks source link

manager: Worker.readState() panic #1

Closed tesselslate closed 2 years ago

tesselslate commented 2 years ago
panic: runtime error: slice bounds out of range [216:144]

goroutine 10985 [running]:
bufio.(*Reader).ReadSlice(0xc0002231a0, 0xd8?)
    /usr/lib/go/src/bufio/bufio.go:346 +0x225
bufio.(*Reader).ReadLine(0xc0002231a0)
    /usr/lib/go/src/bufio/bufio.go:400 +0x27
resetti/manager.(*Worker).readState(0xc00021e340)
    /home/dog/repos/resetti/manager/worker.go:221 +0x45
resetti/manager.(*Worker).updateState(0xc00021e340)
    /home/dog/repos/resetti/manager/worker.go:269 +0x45
created by resetti/manager.(*Worker).loop
    /home/dog/repos/resetti/manager/worker.go:183 +0x36a

Might be an issue with reading the log file while it is being written to (perhaps the reader expects it can go further than is currently available in memory?)