Last Comment Bug 761936 - Audio doesn't stop playing when out-of-process app is "closed"
: Audio doesn't stop playing when out-of-process app is "closed"
Status: RESOLVED FIXED
: qawanted
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: unspecified
: ARM Gonk (Firefox OS)
: P1 normal (vote)
: ---
Assigned To: Matthew Gregan [:kinetik]
: dclarke@mozilla.com [:onecyrenus]
Mentors:
Depends on: 695612 777259
Blocks: b2g-e10s-work
  Show dependency treegraph
 
Reported: 2012-06-06 00:06 PDT by Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
Modified: 2012-08-13 11:26 PDT (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments

Description Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-06-06 00:06:23 PDT
STR
 (1) Load PenguiPop app out-of-process in current gaia.
 (2) Use the task switcher to "close" it.

The game's audio continues to play after it's "closed".  We're probably not destroying the iframe hard enough, or it's not tickling the right thing in gecko.

Filing in b2g for now, but might be a more general platform issue.  (The underlying problem here might be leading to other issues as well.)
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-06-07 05:13:51 PDT
Sorry, s/PenguiPop/Cut the Rope/.

We're definitely destroying the iframe when we expect to

[time:1339070413288758][PBrowserParent] Sending Msg_Destroy([TODO])
[time:1339070413289410][PBrowserChild] Received Msg_Destroy([TODO])
[time:1339070413292247][PLayerChild] Sending Msg___delete__([TODO])
[time:1339070413292675][PLayersChild] Sending Msg___delete__([TODO])
[time:1339070413292891][PRenderFrameChild] Sending Msg___delete__([TODO])
[time:1339070413293088][PBrowserChild] Sending Msg___delete__([TODO])
[time:1339070413304502][PLayerParent] Received Msg___delete__([TODO])
[time:1339070413304842][PLayersParent] Received Msg___delete__([TODO])
[time:1339070413304949][PRenderFrameParent] Received Msg___delete__([TODO])
[time:1339070413305052][PBrowserParent] Received Msg___delete__([TODO])

everything that needs to shut down shuts down.  But we keep sending audio data for *quite* a while, another 40 seconds or so, and finally DrainDone()

[time:1339070460966412][PAudioParent] Sending Msg_PositionInFramesUpdate([TODO])
[time:1339070460966921][PAudioChild] Received Msg_PositionInFramesUpdate([TODO])
[time:1339070461888392][PAudioParent] Sending Msg_DrainDone([TODO])
[time:1339070461888766][PAudioChild] Received Msg_DrainDone([TODO])

Definitely a gecko problem.  Apparently works in xul-fennec on android, which is rather suspicious ...
Comment 2 cajbir (:cajbir) 2012-06-07 05:21:30 PDT
Possibly the gonk audio backend for libsydneyaudio? Anyone doing a libcubeb gonk backend?
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-06-07 13:26:49 PDT
I'm hoping it's something dumber than that, but maybe.
Comment 4 Matthew Gregan [:kinetik] 2012-06-07 20:06:51 PDT
This sounds like bug 695612, but I don't know why it wouldn't be showing up in xul-fennec too.
Comment 5 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-06-08 01:21:43 PDT
I think the options we have here are
 1. Have content processes directly talk to mediaserver on Gonk.  This is most expedient.  That's not horribly bad, but means that we increase the surface area of OS that content processes touch for no particular reason.  (We don't vouch for mediaserver security-wise.)  This will also pretty much kill off the sandboxed audio backend for the time being.

 2. Fix bug 695612.  That's not hard at all.

 3. Make the proxying audio backed use cubeb(?).  (And make the Gonk backend use cubeb?)  I'm not entirely sure what this approach entails.

Media folks, thoughts?
Comment 6 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-18 20:05:30 PDT
Matthew, please take this ...
Comment 7 Matthew Gregan [:kinetik] 2012-07-18 20:10:12 PDT
This should already be fixed if bug 695612 was the root cause.  If someone with a current build can test and let me know, that'd be great.
Comment 8 Geo Mealer [:geo] -- This account is inactive after 2015-07-07 2012-07-24 13:07:11 PDT
Will check and update bug this aft
Comment 9 Geo Mealer [:geo] -- This account is inactive after 2015-07-07 2012-07-24 17:28:14 PDT
David Clarke has said he'll take this on since it related to his media testing.
Comment 10 dclarke@mozilla.com [:onecyrenus] 2012-07-25 01:01:03 PDT
Just to follow up: 
have the 07/24/2012 build running on otoro device.

Cut The Rope App, when loading reports basically a 404 that the dns entry cuttherope could not be found. 

Music App Doesn't recognize local Storage.  
Video App has the same problem. 

So we are in a bit of flux.
Comment 11 Matthew Gregan [:kinetik] 2012-07-31 19:20:41 PDT
Do we have any other way to reproduce this?  Chris?
Comment 12 Andreas Gal :gal 2012-08-08 10:10:56 PDT
How are we doing here?
Comment 13 dclarke@mozilla.com [:onecyrenus] 2012-08-09 10:49:18 PDT
I think the open question is whether there is another way to reproduce this bug? 

I believe the only
Comment 14 dclarke@mozilla.com [:onecyrenus] 2012-08-09 11:13:39 PDT
I think the open question is whether there is another way to reproduce this bug? 

When I load the cut the rope app, there are quite a few parse errors in logcat, and then the application fails. 

Device Storage is still a blocker for me, however It looks like the bug has a patch.  

John any ideas as to how to reproduce this?
Comment 15 cajbir (:cajbir) 2012-08-10 02:07:06 PDT
Open the browser. Navigate to a web page with audio (eg. http://cd.pn/a). Start playing. Switch away from the browser and then close it using the task switcher. Does the audio continue?
Comment 16 dclarke@mozilla.com [:onecyrenus] 2012-08-13 11:26:36 PDT
This was verifed over the weekend as 777259 got committed. 

Audio stops as expected.

Note You need to log in before you can comment on or make changes to this bug.