Closed
Bug 1422664
Opened 7 years ago
Closed 7 years ago
Audio playback fails when using jack backend and no system capture devices exist
Categories
(Core :: Audio/Video: cubeb, defect, P5)
Core
Audio/Video: cubeb
Tracking
()
RESOLVED
FIXED
People
(Reporter: adenosine3p, Assigned: achronop)
References
Details
If cubeb is set to use the jack backend with no system capture devices available, any attempt to play a media file will crash the tab it is being played in. I know it fails with jack2, but I'm not sure about the other jack server--it may have an implementation that's different but jack2 seems to be the more popular choice. I also suspect it will crash if you have no system output devices either, but I did not test this.
One of the crash reports that I submitted may be found at https://crash-stats.mozilla.com/report/index/c4a973c3-c68e-4cba-8bb8-63c570171204
The cause of the problem seems to be in cbjack_connect_ports in cubeb_jack.cpp. It expects get_jack_ports to return an empty list if no devices are found, but that's not the case, at least in jack2. It returns NULL if no devices are found. This appears to be intentional as their own example client code expects this behaviour[1]. It's not documented in the jack API documentation, but that function also seems to return NULL in certain error conditions[2].
[1] https://github.com/jackaudio/jack2/blob/master/example-clients/simple_client.c#L179
[2] https://github.com/jackaudio/jack2/blob/master/common/JackAPI.cpp#L1289
Comment 1•7 years ago
|
||
Alex can you asses this bug please for me?
Flags: needinfo?(achronop)
Whiteboard: [need info :achronop 2017-12-04]
Assignee | ||
Comment 2•7 years ago
|
||
Firefox does not officially support jack backend. What we have is mostly work from contributors. Nevertheless this looks pretty straight forward and simple. I will fix it but I am not able to test it so I rely on reporter to verify. If you need more on jack backend patches are welcome.
Assignee: nobody → achronop
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(achronop)
Whiteboard: [need info :achronop 2017-12-04]
Assignee | ||
Comment 3•7 years ago
|
||
Fix is pushed in my personal repo. It was lees trivial than I thought initially. I would appreciate if anyone can verify before I create a PR against official cubeb repo.
https://github.com/achronop/cubeb/tree/jack-crash-no-devices
Reporter | ||
Comment 4•7 years ago
|
||
I built the tests using the master branch of your repo and was able to reproduce the issue using the test_audio file it built.
I built against the jack-crash-no-devices branch and it works like a charm! Thanks!
Updated•7 years ago
|
Priority: -- → P5
Assignee | ||
Comment 5•7 years ago
|
||
Fix on Bug 1432733.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•