Closed
Bug 1216545
Opened 9 years ago
Closed 9 years ago
Crash in libAVFAudio.dylib
Categories
(Firefox for iOS :: General, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: aaronmt, Assigned: st3fan)
References
()
Details
(Keywords: crash, reproducible)
Attachments
(1 file)
Yet another crash in libAVFAudio.dylib Reproducible. Steps from ios-mobile-testers * Visit npr.org, hit play on the live-stream at the top * Switch out of Firefox, open the timer in the Clock application, set for a min * Turn off display * When the alarm goes off, audio suspends in Firefox, on switch back to Firefox we crash * Re-open Firefox and it crashes again 2015-10-20 10:04:47.390 Client[1476:814824] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'error 561015905' * thread #1: tid = 0xc6ee8, 0x0000000198ee31e0 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
Comment 1•9 years ago
|
||
Possibly related, I saw this on my Simulator yesterday after Bug 1215972 landed. 2015-10-19 13:41:06.168 Client[13665:3213222] 13:41:06.168 ERROR: AVAudioIONodeImpl.mm:365: _GetHWFormat: required condition is false: hwFormat 2015-10-19 13:41:06.169 Client[13665:3213222] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: hwFormat' *** First throw call stack: ( 0 CoreFoundation 0x0000000106558f65 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000105878deb objc_exception_throw + 48 2 CoreFoundation 0x0000000106558dca +[NSException raise:format:arguments:] + 106 3 libAVFAudio.dylib 0x000000010d427e53 _Z19AVAE_RaiseExceptionP8NSStringz + 176 4 libAVFAudio.dylib 0x000000010d4693a7 _ZN13AVAudioIOUnit12_GetHWFormatEjPj + 373 5 libAVFAudio.dylib 0x000000010d4690aa ___ZN13AVAudioIOUnit22IOUnitPropertyListenerEPvP28OpaqueAudioComponentInstancejjj_block_invoke_2 + 166
Updated•9 years ago
|
Assignee | ||
Comment 2•9 years ago
|
||
Console: 2015-10-20 15:01:52.857 Client[10329:2870709] 15:01:52.820 ERROR: [0x1a1ed2000] >aurioc> 807: failed: '!pla' (enable 2, outf< 2 ch, 44100 Hz, Float32, non-inter> inf< 2 ch, 0 Hz, Float32, non-inter>) 2015-10-20 15:01:52.891 Client[10329:2870709] 15:01:52.889 ERROR: [0x1a1ed2000] AVAudioEngineGraph.mm:2510: PerformCommand: error 561015905 Trace: Thread 1Queue : com.apple.main-thread (serial) #0 0x000000019ac1ff48 in objc_exception_throw () #1 0x0000000186f6744c in __NSThreadPerformPerform () #2 0x0000000185fe05a4 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ () #3 0x0000000185fe0038 in __CFRunLoopDoSources0 () #4 0x0000000185fddd38 in __CFRunLoopRun () #5 0x0000000185f0cdc0 in CFRunLoopRunSpecific () #6 0x0000000191060088 in GSEventRunModal () #7 0x000000018b5e6f44 in UIApplicationMain () #8 0x000000010023519c in main at /Users/sarentz/Projects/firefox-ios/Client/Application/main.swift:22 #9 0x000000019b44a8b8 in start ()
Assignee | ||
Comment 3•9 years ago
|
||
Thrown from:
func startEngine() {
if !engine.running {
do {
>>>>>> try engine.start()
} catch {
log.error("Unable to start AVAudioEngine: \(error)")
}
}
}
Assignee | ||
Comment 4•9 years ago
|
||
Interesting the catch clause is never called. This may not work as we expect it to.
Assignee | ||
Comment 5•9 years ago
|
||
Some notes: Safari behaviour: Make sure audio is silent Open a new tab, go to http://www.relay.fm/mpu/284 Play the podcast Hit the home button - Audio keeps playing Open Clock, set an alarm for 1 minute Lock screen - Audio keeps playing When alarm goes off, silence it "Tap to Stop" Audio should still be playing Unlock phone Double tap Switch to Safari - Audio should still be playing
Assignee | ||
Comment 6•9 years ago
|
||
We already fail here: When alarm goes off, silence it "Tap to Stop" Audio should still be playing We don't crash, but the audio stops playing. I think we may be using the wrong audio session flags/mode/etc.
Assignee | ||
Comment 7•9 years ago
|
||
I have added the 'audio' background mode to the app. This gives us behaviour similar to Safari and stops the crashes. I don't think this one had anything to do with our AuralProgressBar code. I think this is about the WKWebView playing audio.
Assignee | ||
Comment 8•9 years ago
|
||
This patch adds audio as a required background mode. This prevents the crash and also makes the app behave similar to Safari wrt audio. You can now for example start a podcast in a tab, answer a phone call, or play a game, and the podcast will be correctly suspended and resumed.
Attachment #8676446 -
Flags: review?(sleroux)
Attachment #8676446 -
Flags: review?(rnewman)
Attachment #8676446 -
Flags: feedback?(aaron.train)
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8676446 [details] [review] PR: https://github.com/mozilla/firefox-ios/pull/1179 #1180 works for me https://github.com/mozilla/firefox-ios/pull/1180
Attachment #8676446 -
Flags: feedback?(aaron.train)
Comment 10•9 years ago
|
||
I merged that. 273dcf7
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 11•9 years ago
|
||
Comment on attachment 8676446 [details] [review] PR: https://github.com/mozilla/firefox-ios/pull/1179 sleroux, please post-review!
Attachment #8676446 -
Flags: review?(rnewman) → review+
Updated•9 years ago
|
Attachment #8676446 -
Flags: review?(sleroux)
Comment 12•9 years ago
|
||
I can't reproduce the crash using the steps from description. Verifying as fixed on Beta 1113
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•