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

MediaMTX crashes after enabling recording on path with source on demand #3246

Closed
1 task done
mfurmanit opened this issue Apr 15, 2024 · 3 comments · Fixed by #3249
Closed
1 task done

MediaMTX crashes after enabling recording on path with source on demand #3246

mfurmanit opened this issue Apr 15, 2024 · 3 comments · Fixed by #3249
Labels
api hooks external auth bug Something isn't working

Comments

@mfurmanit
Copy link

mfurmanit commented Apr 15, 2024

Which version are you using?

v1.7.0

Which operating system are you using?

  • Linux amd64 Docker

Describe the issue

MediaMTX crashes after sending PATCH request that enables recording for path with sourceOnDemand true.
Expected behavior should be automatically changing sourceOnDemand from value true to false, when we send { "record": true } request body. Another option is returning exception from API with message saying something like "you cannot start recording on camera with source on demand".

Describe how to replicate the issue

  1. Start the server.
  2. Add path with properties source, sourceOnDemand (true) and sourceOnDemandCloseAfter (through API).
  3. Send PATCH request with body { "record": true } through API.
  4. Check logs to see the segmentation error.

Did you attach the server logs?

yes

Below, after sending PATCH request.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xcf1d60]

goroutine 193 [running]:
github.com/bluenviron/mediamtx/internal/core.(*staticSourceHandler).reloadConf(0x75ce25?, 0xc00051e540?)
        /s/internal/core/static_source_handler.go:229 +0x20
created by github.com/bluenviron/mediamtx/internal/core.(*path).doReloadConf in goroutine 164
        /s/internal/core/path.go:374 +0x173

Did you attach a network dump?

no

@aler9
Copy link
Member

aler9 commented Apr 15, 2024

Thanks for reporting the crash, this is fixed by #3249.

In the meanwhile, you can use the nightly binaries available here:

https://github.com/bluenviron/mediamtx/actions/runs/8688254581

Copy link
Contributor

This issue is mentioned in release v1.8.0 🚀
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 Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api hooks external auth bug Something isn't working
Projects
None yet
2 participants