hajimehoshi / go-mp3

An MP3 decoder in pure Go
Apache License 2.0
746 stars 80 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #11

Closed faiface closed 7 years ago

faiface commented 7 years ago
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x49408a]

goroutine 1 [running]:
github.com/hajimehoshi/go-mp3.(*source).readNextFrame(0xc4200780c0, 0x0, 0xc42008e018, 0x7fa7adbcd028, 0xc42008e018, 0x1)
        /home/faiface/go/src/github.com/hajimehoshi/go-mp3/read.go:42 +0x6a
github.com/hajimehoshi/go-mp3.NewDecoder(0x728be0, 0xc42008e018, 0xc42008e018, 0x0, 0x0)
        /home/faiface/go/src/github.com/hajimehoshi/go-mp3/decode.go:291 +0x119

This happens when I attempt to play any song converted to MP3 using VLC and a few other files.

hajimehoshi commented 7 years ago

Could you give an example to reproduce this?

faiface commented 7 years ago

Just play the go-mp3 example with any MP3 produced from VLC.

hajimehoshi commented 7 years ago

Confirmed.

hajimehoshi commented 7 years ago

Fixed