Closed
Bug 1515548
Opened 6 years ago
Closed 6 years ago
Crash [@ webrtc::DesktopCaptureImpl::Run ] provoked by {frameRate: {max: 0}} (divide by zero)
Categories
(Core :: WebRTC, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla66
People
(Reporter: jib, Assigned: dminor)
References
Details
Crash Data
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
STRs: 1. Open https://jsfiddle.net/jib1/j21wyx86/ and share screen Expected result: Screen sharing Actual result: Nightly: bp-4aeda29d-331a-44a6-b860-7e7410181220 Release: bp-49af8557-3334-4920-b373-079bb0181220 Divide by zero: #if !defined(_WIN32) const uint32_t processTime = ((uint32_t)(rtc::TimeNanos() - startProcessTime)) / rtc::kNumNanosecsPerMillisec; // Use at most x% CPU or limit framerate ->const uint32_t maxFPSNeeded = 1000 / _requestedCapability.maxFPS; Not a regression. Only tested on OSX. Found while writing wpt for bug 1321221. Hopefully a simple fix.
Reporter | ||
Updated•6 years ago
|
Blocks: 1321221
status-firefox64:
--- → wontfix
status-firefox65:
--- → affected
status-firefox66:
--- → affected
status-firefox-esr60:
--- → affected
status-geckoview64:
--- → unaffected
status-geckoview65:
--- → unaffected
tracking-firefox65:
--- → ?
tracking-firefox66:
--- → ?
Assignee | ||
Comment 1•6 years ago
|
||
This clamps requests for FPS that are below 1 to 1. As far as I can tell, the getDisplayMedia specification does not provide any guidance on how to interpret negative or zero FPS constraints, so this seems like a reasonable limitation. I'm not adding a test here as there will be a wpt test that covers this as part of Bug 1321221.
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60f1310f5d25 Fix potential divide by zero in DesktopCaptureImpl; r=jib
Comment 3•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/60f1310f5d25
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Comment 4•6 years ago
|
||
Given that this is a longstanding issue, I don't think this needs to be tracked. That said, I'll happily entertain a Beta uplift request :)
Assignee | ||
Comment 5•6 years ago
|
||
Comment on attachment 9032705 [details] Bug 1515548 - Fix potential divide by zero in DesktopCaptureImpl; r=jib! [Beta/Release Uplift Approval Request] Feature/Bug causing the regression: None User impact if declined: Browser crash with divide by zero if user requests 0 FPS Is this code covered by automated tests?: Yes Has the fix been verified in Nightly?: Yes Needs manual test from QE?: No If yes, steps to reproduce: List of other uplifts needed: None Risk to taking this patch: Low Why is the change risky/not risky? (and alternatives if risky): Low risk because this adds code to handle zero and negative FPS. Positive FPS should be unaffected. String changes made/needed: None
Flags: needinfo?(dminor)
Attachment #9032705 -
Flags: approval-mozilla-beta?
Comment 6•6 years ago
|
||
Comment on attachment 9032705 [details] Bug 1515548 - Fix potential divide by zero in DesktopCaptureImpl; r=jib! [Triage Comment] Better edge case handling to reduce WebRTC crashes. Approved for 65.0b8.
Attachment #9032705 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 7•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/b41ed6f2639a
Comment 8•6 years ago
|
||
(In reply to Dan Minor [:dminor] from comment #5) > Is this code covered by automated tests?: Yes > Has the fix been verified in Nightly?: Yes > Needs manual test from QE?: No Setting this as qe-verify-.
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•