Closed Bug 619827 Opened 9 years ago Closed 9 years ago

throw from AudioTrack constructor kills fennec

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: dougt, Assigned: dougt)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch v.1 (obsolete) — Splinter Review
If you load a file that has a sample that isn't support, we will throw:


W/System.err( 3061): java.lang.IllegalArgumentException: 1000Hz is not a supported sample rate.
W/System.err( 3061): 	at android.media.AudioTrack.audioParamCheck(AudioTrack.java:317)
W/System.err( 3061): 	at android.media.AudioTrack.<init>(AudioTrack.java:268)
W/System.err( 3061): 	at dalvik.system.NativeStart.run(Native Method)
W/System.err( 3061): 	at dalvik.system.NativeStart.run(Native Method)

If this isn't caught, fennec isn't usable as it freezes.
Attachment #498243 - Flags: superreview?
Attachment #498243 - Flags: review?(mwu)
tracking-fennec: --- → 2.0+
Attachment #498243 - Flags: superreview? → review?(kinetik)
We probably also need to run the error-exit code in the OOM-check branch directly below it, otherwise we'll leak a local frame.
Comment on attachment 498243 [details] [diff] [review]
patch v.1

You still need to pop the local frame and delete that global reference.
Attachment #498243 - Flags: review?(mwu)
Attachment #498243 - Flags: review?(kinetik)
Attached patch patch v.1Splinter Review
Attachment #498243 - Attachment is obsolete: true
Attachment #498246 - Flags: review+
Comment on attachment 498246 [details] [diff] [review]
patch v.1

Not bumping the version on versioned patches is confusing.
Attachment #498246 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/fc50c521bf48
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Can someone help me verify this bug?  I don't have access to a Firefox Mobile capable device.
You need to log in before you can comment on or make changes to this bug.