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

1.3.0 panic: runtime error: slice bounds out of range [1:0] #2688

Closed
12 tasks
iesv opened this issue Nov 13, 2023 · 3 comments · Fixed by #2692
Closed
12 tasks

1.3.0 panic: runtime error: slice bounds out of range [1:0] #2688

iesv opened this issue Nov 13, 2023 · 3 comments · Fixed by #2692
Labels
bug Something isn't working webrtc

Comments

@iesv
Copy link

iesv commented Nov 13, 2023

Which version are you using?

v1.3.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • [ x] Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

when publish by chrome: http://127.0.0.1:8889/publish, it will crash.

Describe how to replicate the issue

  1. start the server
  2. publish with(http://127.0.0.1:8889/publish)
  3. read with chrome

Did you attach the server logs?

2023/11/13 09:55:17 INF MediaMTX v1.3.0
2023/11/13 09:55:17 INF configuration loaded from D:\Bible\OBS\mediamtx.yml
2023/11/13 09:55:17 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2023/11/13 09:55:17 INF [RTMP] listener opened on :1935
2023/11/13 09:55:17 INF [HLS] listener opened on :8888
2023/11/13 09:55:17 INF [WebRTC] listener opened on :8889 (HTTP), :8189 (ICE/UDP)
2023/11/13 09:55:17 INF [SRT] listener opened on :8890 (UDP)
panic: runtime error: slice bounds out of range [1:0]

goroutine 58 [running]:
github.com/bluenviron/mediamtx/internal/protocols/httpserv.(*handlerExitOnPanic).ServeHTTP.func1()
/s/internal/protocols/httpserv/handler_exit_on_panic.go:21 +0x5e
panic({0x18af3a0?, 0xc0002520f0?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/bluenviron/mediamtx/internal/core.(*webRTCHTTPServer).onRequest(0xc0001910b0, 0xc0004a8300)
/s/internal/core/webrtc_http_server.go:352 +0x8f3
github.com/gin-gonic/gin.(*Context).Next(...)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.serveError(0xc0004a8300, 0x194, {0x205cb50, 0x12, 0x12})
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:656 +0x4b
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000196340, 0xc0004a8300)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:649 +0x485
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000196340, {0x1a885b0?, 0xc00052e180}, 0xc0004a8100)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576 +0x1dd

yes / no

Did you attach a network dump?

yes / no

@aler9
Copy link
Member

aler9 commented Nov 13, 2023

thanks for reporting the issue, this was present in versions before 1.3.0 too and happened when reading with WebRTC from path "publish".

Copy link
Contributor

This issue is mentioned in release v1.3.1 🚀
Check out the entire changelog by clicking here

Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working webrtc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants