-
Notifications
You must be signed in to change notification settings - Fork 80
Intermittent "Slice bounds out of range" during decoding #40
Comments
Thanks. Unfortunately I don't fully understand the implementation details because I just ported the existing MP3 decoder to Go. I'll take a look but I'm not sure I can find a correct fix. |
This part seems what I wrote. I'll take a look. |
Isn't this simply out of range? Or, was this error happening with any position? |
No, it wasn't out of range, and yes it seems to happen with any position. It seemed to happen randomly. The code to reproduce is meant to emulate a user clicking once every 250ms, as this was the original way I found the issue. |
This bug still occurs frequently as of 2023 April. I am trying to change the seeker progress with a GUI slidebar, but it crashes if I send the request too frequently. It is always the message: panic: runtime error: slice bounds out of range [????:4608]. Notice the slice size is always capped at the magic number 4608 |
I have noticed an intermittent panic error that occurs during decoding. This happens specifically when seek is called several times in quick succession. (e.g rapidly clicking).
It might be appropriate to debounce seeking, however I thought I'd raise this anyway as I'm not sure.
panic: runtime error: slice bounds out of range [5696:4608]
The panic occurs here:
go-mp3/decode.go
Line 102 in cc618d1
I can reproduce this using the following
faiface/beep
code. It seems possible that this is a bug within beep. I don't understand the situation well enough so I have decided to at least put this on your radar.One way to fix this:
However I don't understand the underlying cause so there may be a better solution.
The text was updated successfully, but these errors were encountered: