Crash in [@ java.lang.RuntimeException: at android.media.MediaCodecList.native_getCodecCount(Native Method)] "cannot get MediaCodecList"
Categories
(GeckoView :: Media, defect, P2)
Tracking
(firefox115 wontfix, firefox116 fixed, firefox117 fixed)
People
(Reporter: cpeterson, Assigned: az)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-release+
|
Details | Review |
Crash report: https://crash-stats.mozilla.org/report/index/3369bfe2-f697-4d1e-a913-472b20230719
This is not a new crash: we have crash reports going back to at least Fenix 92, but there volume of reports has increased from ~10 in Fenix 108 to 100+ in Fenix 109 and steadily increasing to 700+ in Fenix 114.
100% of the crashes are from Android version <= 7.0 (API 28). 76% are from Android 7.0 (API 24).
Java stack trace:
java.lang.RuntimeException: cannot get MediaCodecList
at android.media.MediaCodecList.native_getCodecCount(Native Method)
at android.media.MediaCodecList.initCodecList(MediaCodecList.java:82)
at android.media.MediaCodecList.getCodecCount(MediaCodecList.java:43)
at org.mozilla.gecko.util.HardwareCodecCapabilityUtils.getHWCodecCapability(HardwareCodecCapabilityUtils.java:3)
at org.mozilla.gecko.util.HardwareCodecCapabilityUtils.hasHWH264(HardwareCodecCapabilityUtils.java:2)
at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:613)
| Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
Interestingly, it looks like we ran into something similar in 1357287. According to the notes, it looks like it was an Android bug on certain devices, though I'm not sure why we'd have a spike in reports recently. I've submitted a patch that makes a similar fix to 1357287 by bailing out if there's a Android failure querying for codec support. The submitted patch will also use getCodecInfos if supported instead of getCodecCount in the loop where the crashes were occurring, which may be more reliable.
| Reporter | ||
Comment 3•3 years ago
|
||
We might want to uplift this crash fix to a 116.x dot release (currently scheduled for 2023-08-07). With 116.0 being released next week, it's too late to uplift to a 115.x dot release.
| Assignee | ||
Comment 4•3 years ago
|
||
Re-adding the crash keyword, looks like my previous update removed it.
Comment 6•2 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 7•2 years ago
|
||
Comment on attachment 9345143 [details]
Bug 1844622 - Catch and ignore runtime exception during media codec query on Android if MediaCodecInfo cannot be retrieved. r=jolin
Beta/Release Uplift Approval Request
- User impact if declined: Crashes on Android instead of graceful / recoverable failure when media codecs fail to enumerate.
- Is this code covered by automated tests?: Unknown
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): We don't have many crash reports of this on nightly to compare against. However, this fix doesn't touch a lot of code and tackles the bug in the same manner a previous bug of this nature was squashed.
- String changes made/needed:
- Is Android affected?: Yes
Comment 8•2 years ago
|
||
Comment on attachment 9345143 [details]
Bug 1844622 - Catch and ignore runtime exception during media codec query on Android if MediaCodecInfo cannot be retrieved. r=jolin
Approved for the 116.0.3 dot release
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•