Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta 6 broken- panic slice bounds out of range #44

Closed
calisro opened this issue Sep 17, 2022 · 9 comments
Closed

Beta 6 broken- panic slice bounds out of range #44

calisro opened this issue Sep 17, 2022 · 9 comments
Labels
bug Something isn't working
Milestone

Comments

@calisro
Copy link

calisro commented Sep 17, 2022

Latest beta 6 won't run at all. COnstant panics. Had to roll back.

2022/09/17 14:52:00 http: panic serving 127.0.0.1:37908: runtime error: slice bounds out of range [8:7]
goroutine 25 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1825 +0xb8
panic({0x69af60, 0x4000036198})
	runtime/panic.go:844 +0x260
github.com/AlexxIT/go2rtc/cmd/hass.initAPI.func3({0x7dd5b0, 0x400007c620}, 0x4000032a00)
	github.com/AlexxIT/go2rtc/cmd/hass/api.go:57 +0x52c
net/http.HandlerFunc.ServeHTTP(0x72?, {0x7dd5b0?, 0x400007c620?}, 0x1cd20?)
	net/http/server.go:2084 +0x3c
net/http.(*ServeMux).ServeHTTP(0x0?, {0x7dd5b0, 0x400007c620}, 0x4000032a00)
	net/http/server.go:2462 +0x144
net/http.serverHandler.ServeHTTP({0x400007e600?}, {0x7dd5b0, 0x400007c620}, 0x4000032a00)
	net/http/server.go:2916 +0x408
net/http.(*conn).serve(0x400031cf00, {0x7ddc40, 0x400007e0c0})
	net/http/server.go:1966 +0x550
created by net/http.(*Server).Serve
	net/http/server.go:3071 +0x448
@calisro calisro changed the title Beta 6 broken. Beta 6 broken- panic slice bounds out of range Sep 17, 2022
@rogerquake
Copy link

same for me, also had to revert back.

@AlexxIT AlexxIT added the bug Something isn't working label Sep 17, 2022
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 17, 2022

You need to restart RTSPtoWebRTC integration

@rogerquake
Copy link

thanks, works after that!

@calisro
Copy link
Author

calisro commented Sep 18, 2022

Yes that did the trick.

@AlexxIT AlexxIT pinned this issue Sep 18, 2022
@calisro
Copy link
Author

calisro commented Sep 18, 2022

But I still see them fairly frequently..

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
Copy link
Author

calisro commented Oct 6, 2022

I started seeing these again and restarting/removing/re-adding the RTSPtoWebRTC doesn't seem to help. The only difference though is the ip is different now. Its the docker ips...

  "camera.kitchen_display": 
    - "{input}"
    - ffmpeg:{input}#audio=opus
2022/10/06 10:31:27 http: panic serving 172.30.33.9:44268: runtime error: slice bounds out of range [:-1]
goroutine 13 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1825 +0xb8
panic({0x6ab5a0, 0x4000584120})
	runtime/panic.go:844 +0x260
github.com/AlexxIT/go2rtc/cmd/streams.GetProducer({0x4000137c78, 0x7})
	github.com/AlexxIT/go2rtc/cmd/streams/handlers.go:30 +0xec
github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).GetMedias(0x40001d76c0)
	github.com/AlexxIT/go2rtc/cmd/streams/producer.go:46 +0x12c
github.com/AlexxIT/go2rtc/cmd/streams.(*Stream).AddConsumer(0x40001aeff0, {0x7edb10?, 0x400020c1c0})
	github.com/AlexxIT/go2rtc/cmd/streams/stream.go:63 +0x2c8
github.com/AlexxIT/go2rtc/cmd/webrtc.offerHandler(0x40000e61c0, 0x4000098040)
	github.com/AlexxIT/go2rtc/cmd/webrtc/webrtc.go:109 +0x408
github.com/AlexxIT/go2rtc/cmd/api.apiWS({0x7ee890, 0x4000206000}, 0x4000032100)
	github.com/AlexxIT/go2rtc/cmd/api/api.go:131 +0x198
net/http.HandlerFunc.ServeHTTP(0x72?, {0x7ee890?, 0x4000206000?}, 0x1cd20?)
	net/http/server.go:2084 +0x3c
net/http.(*ServeMux).ServeHTTP(0x400026800c?, {0x7ee890, 0x4000206000}, 0x4000032100)
	net/http/server.go:2462 +0x144
net/http.serverHandler.ServeHTTP({0x4000540090?}, {0x7ee890, 0x4000206000}, 0x4000032100)
	net/http/server.go:2916 +0x408
net/http.(*conn).serve(0x40002b4000, {0x7eef20, 0x40000900c0})
	net/http/server.go:1966 +0x550
created by net/http.(*Server).Serve
	net/http/server.go:3071 +0x448

Seems I get similar with any reference now to localhost/127.0.0.1... I am using the HA addon on HAOS.

@jtauke
Copy link

jtauke commented Oct 14, 2022

I'm seeing the same error: slice bounds out of range, but seemingly only when I add an rtsp stream off my udm pro (g3 instant and g4 doorbell)

version: 0.1-beta.8

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 4, 2022

slice bounds out of range [:-1] - will be fixed in next release
slice bounds out of range [8:7] - will be fixed in next release
slice bounds out of range [:8192] with capacity 4096 - described in other issue

@AlexxIT AlexxIT added this to the v0.1-rc.1 milestone Nov 4, 2022
@AlexxIT
Copy link
Owner

AlexxIT commented Nov 4, 2022

@AlexxIT AlexxIT closed this as completed Nov 4, 2022
@AlexxIT AlexxIT unpinned this issue Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants