go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

panic: runtime error: slice bounds out of range [:8192] with capacity 4096

Open calisro opened this issue 3 years ago • 3 comments

Seeing these quite frequently. I didn't see these reported but if they have, please close as duplicate.

panic: runtime error: slice bounds out of range [:8192] with capacity 4096
goroutine 500 [running]:
bufio.(*Reader).ReadSlice(0x4000460ea0, 0xc?)
	bufio/bufio.go:346 +0x230
bufio.(*Reader).ReadLine(0x4000460ea0)
	bufio/bufio.go:400 +0x28
net/textproto.(*Reader).readLineSlice(0x400009fe20)
	net/textproto/reader.go:57 +0x7c
net/textproto.(*Reader).ReadLine(...)
	net/textproto/reader.go:38
github.com/AlexxIT/go2rtc/pkg/tcp.ReadRequest(0x4000460ea0)
	github.com/AlexxIT/go2rtc/pkg/tcp/textproto.go:115 +0x68
github.com/AlexxIT/go2rtc/pkg/rtsp.(*Conn).Handle(0x4000106f70)
	github.com/AlexxIT/go2rtc/pkg/rtsp/conn.go:628 +0x11c
github.com/AlexxIT/go2rtc/pkg/rtsp.(*Conn).Start(0x4000106f70)
	github.com/AlexxIT/go2rtc/pkg/rtsp/streamer.go:37 +0x9c
github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).start.func1()
	github.com/AlexxIT/go2rtc/cmd/streams/producer.go:93 +0x34
created by github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).start
	github.com/AlexxIT/go2rtc/cmd/streams/producer.go:92 +0x168

calisro avatar Sep 18 '22 20:09 calisro

Oh I see this is a duplicate.

calisro avatar Sep 18 '22 20:09 calisro

https://github.com/AlexxIT/go2rtc/issues/44

calisro avatar Sep 18 '22 20:09 calisro

This is not duplicate. Some problems while reading data from RTSP

AlexxIT avatar Sep 19 '22 03:09 AlexxIT

Almost same:

panic: runtime error: slice bounds out of range [:4380] with capacity 4096

goroutine 202 [running]:
bufio.(*Reader).Read(0x400057a1e0, {0x40000ba770?, 0x432?, 0x7ff7757db4fc?})
        .../bufio/bufio.go:250 +0x34c
io.ReadAtLeast({0x7ff775c82340, 0x400057a1e0}, {0x40000ba680, 0x522, 0x522}, 0x522)
        .../io/io.go:332 +0xa8
io.ReadFull(...)
        .../io/io.go:351
github.com/AlexxIT/go2rtc/pkg/rtsp.(*Conn).Handle(0x4000096270)
        .../go2rtc/pkg/rtsp/conn.go:715 +0x2f4
github.com/AlexxIT/go2rtc/pkg/rtsp.(*Conn).Start(0x4000096270?)
        .../go2rtc/pkg/rtsp/streamer.go:47 +0x8c
github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).start.func1()
        .../go2rtc/cmd/streams/producer.go:104 +0x30
created by github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).start
        .../go2rtc/cmd/streams/producer.go:102 +0x174

AlexxIT avatar Jan 01 '23 11:01 AlexxIT

I hope problem fixed in https://github.com/AlexxIT/go2rtc/releases/tag/v0.1-rc.7 If not, please reopen issue.

AlexxIT avatar Jan 08 '23 20:01 AlexxIT