Launch Monster Wars and turn off screen before the app is ready ---> the app keeps reproducing audio

Bug #1518122 reported by Stefano Verzegnassi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
High
John McAleely
qtmir (Ubuntu)
Invalid
High
Daniel d'Andrada
qtmultimedia-opensource-src (Ubuntu RTM)
Triaged
High
Jim Hodapp
qtubuntu-media (Ubuntu RTM)
Triaged
High
Jim Hodapp

Bug Description

On OTA-8 (BQ E5),

Steps to reproduce the bug:
1) Launch Falldown/Monster Wars (verified with both games)
2) Before the app is fully loaded (Ubuntu loading/splash screen still visible), turn off the screen

Expected result:
The application is not reproducing any audio, since the screen is off.
This is the behaviour I see when I turn off the screen after the app is loaded (i.e. application main page is visible).

What happens instead:
The application is playing its background music, even if the screen is turned off.

Revision history for this message
dinamic (dinamic6661) wrote :

same here arale/rc-proposed r174

Revision history for this message
Jim Hodapp (jhodapp) wrote :

I did some triaging of this bug quickly and discovered that media-hub wasn't being notified that the client was being suspended, which is what would cause it to pause playback. Then I discovered that during this case, the app isn't actually getting suspended like it should be. So this is the real issue, the lifecycle management isn't behaving correctly.

Gerry Boland (gerboland)
Changed in qtmir:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Daniel d'Andrada (dandrader)
importance: Critical → High
Changed in canonical-devices-system-image:
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
milestone: none → backlog
status: New → Confirmed
Changed in qtmir:
status: Triaged → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Can't reproduce it with r303 on Nexus 7.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Can't reproduce it with r173 on Arale (flashed today, just like the N7)

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Just reproduced it on krillin with the following version info:

current build number: 192
device name: krillin
channel: ubuntu-touch/rc-proposed/bq-aquaris.en
last update: 2015-12-01 10:07:53
version version: 192
version ubuntu: 20151201
version device: 20151028-869191d
version custom: 20151111--36-46-vivid

Revision history for this message
Jim Hodapp (jhodapp) wrote :

I also just reproduced it on the Nexus 7 with r303.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

confirming on krillin, rc-proposed

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Finally reproduced the issue. So far I've been trying with Falldown without success.
Now that I tried with Monster Wars I was able to reproduce it.

summary: - Launch Falldown/Monster Wars and turn off screen before the app is ready
- ---> the app keeps reproducing audio
+ Launch Monster Wars and turn off screen before the app is ready ---> the
+ app keeps reproducing audio
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

unity8 correctly suspends MonsterWars by calling ubuntu_app_launch_pause_application("monsterwars.t-mon_MonsterWars_0.7")
It doesn't happen as soon as you turn the display off though, as unity8 has to wait until the app has finished initialing first (ie, it has draw its first frame or two). So it happens shortly after the display is turned off.

I can see it worked by running:
$ top -d 0.5 -p $(pidof MonsterWars)

"""
  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3886 phablet 20 0 341140 126028 43480 T 0,0 6,8 0:05.59 MonsterWars
"""

Strangely enough the music keeps playing for 10 seconds or so until if finally goes silent.

In short: qtmir (from unity8 process) is doing its part.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

So the problem seems to be that whoever service is playing that audio stream doesn't stop it as soon as the originating process is suspended.

Changed in qtmir:
status: In Progress → Invalid
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
importance: Undecided → High
Changed in qtubuntu-media (Ubuntu RTM):
importance: Undecided → High
Revision history for this message
Jim Hodapp (jhodapp) wrote :

We decided this was an issue where qtmultimedia is not calling paused for the Audio element when the app becomes suspended. For the MediaPlayer element, background playback should be possible and thus needs to be controlled specifically by the application, just like mediaplayer-app does for this case when it's suspended.

Changed in qtmultimedia-opensource-src (Ubuntu RTM):
assignee: nobody → Jim Hodapp (jhodapp)
Changed in qtubuntu-media (Ubuntu RTM):
assignee: nobody → Jim Hodapp (jhodapp)
Changed in qtmultimedia-opensource-src (Ubuntu RTM):
status: New → Triaged
Changed in qtubuntu-media (Ubuntu RTM):
status: New → Triaged
Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
assignee: Michał Sawicz (saviq) → John McAleely (john.mcaleely)
Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.