Closed Bug 1270004 Opened 5 years ago Closed 5 years ago

Crash in winmm_stream_init

Categories

(Core :: Audio/Video: cubeb, defect)

Unspecified
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: njn, Assigned: kinetik)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

fix
43 bytes, text/x-github-pull-request
kinetik
: review+
Details | Review
This bug was filed from the Socorro interface and is 
report bp-8e8217ab-be36-424b-a1e8-950a82160503.
=============================================================

New crash in Nightly 20160502030207. 4 occurrences across 2 installations, though judging by the crash URLs it's the same user for both installations.

Crash address is 0x0. Top frame of the stack trace corresponds to this line in cubeb_winmm.c, which is a really odd-looking assertion:

  XASSERT(!input_stream_params && "not supported.");
kinetik, can you please take a look?
Flags: needinfo?(kinetik)
That assert is to catch a cubeb_stream_init requesting an input or full-duplex stream from a backend that hasn't (yet) implemented the feature.  It should probably just return CUBEB_ERROR_NOT_SUPPORTED instead.

I guess what's happening here is that cubeb_init fails for the WASAPI backend for some reason, so falls back to the WinMM backend.  The full-duplex MSG code knows to only request full-duplex streams on Vista+, but probably nobody considered that Vista+ can fall back to WinMM in unusual situations.

So, to fix this: we can make the assert an error return, but that'll probably still leave the user with a broken WebRTC, so we'll probably need to fix that up to deal with falling back to the old (non-libcubeb) input/full-duplex codepath.
Flags: needinfo?(kinetik)
Attached file fix
This fixes the crash (assert), but as mentioned it'll still leave WebRTC's capture broken in the situation where the fallback happens.
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Attachment #8749009 - Flags: review?(padenot)
09:36 < jesup> kinetik: in that case, we may want to merge achronops patch and not wait for winmm
               (padenot is on holiday)
09:39 < kinetik> jesup: we want the assert removed, at least, so if you can r+ that in padenot's
                 absence i'll merge it
09:39 < kinetik> i merged achronop's fix, minus the stringfying bit
09:48 < jesup> kinetik: r+
Attachment #8749009 - Flags: review?(padenot) → review+
Blocks: 1269472
https://hg.mozilla.org/mozilla-central/rev/cc9051869d1a
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.