Music player only plays one track

RESOLVED FIXED in B2G C2 (20nov-10dec)

Status

Firefox OS
Gaia::Music
P1
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mikeh, Assigned: dkuo)

Tracking

unspecified
B2G C2 (20nov-10dec)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-basecamp:+)

Details

STR:
1. Open music player (i.e. tap on 'Music' icon)
2. Tap one of the tracks to make it play
3. Listen through to the end of the track

Expected: at end of track, next track should begin to play
Observed: at end of track, screen shows title/artist for next track, but progress bar stays at full and shows time of the previous track; pause button does nothing; next/prev track buttons skip tracks but nothing plays.

4. Tap the < button in the top-left corner to return to the track list
5. Tap on a different track

Expected: new track should begin to play
Observed: screen shows title/artist for new track, but progress bar stays at full and still shows time of the previous track; buttons respond as above.

6. Tap on the Home button to return to the home screen
7. Tap on the 'Music' icon

Observed: Music Player resumes in same unresponsive state.

8. Tap and hold the Home button to bring up the window manager
9. Swipe up to force-close the Music Player

Observed: Music Player now works properly, for a single track.  Pressing the next track button moves to the next track but doesn't starting playing it; pressing prev track button does nothing.  Pressing pause pauses playback.  Pressing it again resumes.

Note: my SD card has six mp3s on it, some of which are missing ID3 tags.
More data: the logcat output shows this line, over and over:

I/Gecko - SYDNEY_AUDIO( 1142): 0x455b6940 - get position

Maybe something thinks it's still playing audio?
I see the same issue using today's unagi nightly. Nominating for blocking since this needs to work and all of the music on my device was playing fine prior to today. Running with:

Gaia: 52f649c08c513f81a52edd28c0e0ee3ed9576d98
Gecko: 607313557a95af6b3d56cf8b211237906ed497b3

I also am not able to advance or go forward to another track - when I do I see the same issues as Mike is reporting above, and even when I close the app using the window manager it still does not work for me.
blocking-basecamp: --- → ?
apply 813426 patch and can fix this issue.
Depends on: 813426
blocking-basecamp: ? → +
Priority: -- → P1
Dear Mick, 
813426 patch is landed and this bug seems got fixed. 
Please verify and close it.
Assignee: nobody → dkuo
Target Milestone: --- → B2G C2 (20nov-10dec)
(In reply to Randy Lin [:rlin] from comment #4)
> Dear Mick, 
> 813426 patch is landed and this bug seems got fixed. 
> Please verify and close it.

Hi Randy, I can confirm this is working now.  Thanks!
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(In reply to Mike Habicher [:mikeh] from comment #5)
> (In reply to Randy Lin [:rlin] from comment #4)
> > Dear Mick, 
> > 813426 patch is landed and this bug seems got fixed. 
> > Please verify and close it.
> 
> Hi Randy, I can confirm this is working now.  Thanks!

Oops--spoke too soon.  Something _else_ is going on now.  Note that my Gecko build includes the patch from bug 813426.

STR:
1. Make sure your display timeout is set to something less than the length of a track, e.g. 1 to 2 minutes
2. Open music player (i.e. tap on 'Music' icon)
3. Tap one of the tracks (that is longer than your display timeout) to make it play
4. Make sure the repeat-all-tracks circle is on (so that there is always a "next" track)
--- at some point the display will turn off
3. Listen through to the end of the track
--- once the track you selected is done, the next track does not begin playing
4. Press the power button to wake up the phone
5. Swipe up and tap the lock button to unlock the phone
6. Instead of seeing the music player, the screen will be white.  _Eventually_ it may wake up back into the music player; randomly poking and prodding the touchscreen seems to make the music player reappear
--- once the music player reappears, the next track will start playing
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Some further observations:
a. If I wake the device and unlock the screen _before_ the current song finishes, the music player reappears right away, and the next track starts playing properly.
b. If I prevent the device from going to sleep by periodically tapping on the screen, the next track starts playing properly.
c. If I set the display timeout to something longer than the length of a track, e.g. 10 minutes, the next track starts playing properly.
And some more:
If I leave the phone long enough in state (3) in comment 6, the next track starts playing _eventually_.

Comment 9

6 years ago
> STR:
> 1. Make sure your display timeout is set to something less than the length
> of a track, e.g. 1 to 2 minutes
> 2. Open music player (i.e. tap on 'Music' icon)
> 3. Tap one of the tracks (that is longer than your display timeout) to make
> it play
> 4. Make sure the repeat-all-tracks circle is on (so that there is always a
> "next" track)
> --- at some point the display will turn off
> 3. Listen through to the end of the track
> --- once the track you selected is done, the next track does not begin

Dear Dominic,

Maybe it is related to the timing of releasing wake lock.
If music App released the wake lock after end of a song then system will go to suspend immediately.
(Assignee)

Comment 10

6 years ago
(In reply to Mike Habicher [:mikeh] from comment #8)
> And some more:
> If I leave the phone long enough in state (3) in comment 6, the next track
> starts playing _eventually_.

Hey Mike, can you provide me which commit of gaia you are using?
And if you are sure about it's related to the screen is on or off,
maybe filing a new bug or rename this one will be a better choice.
I think the original issue is fixed by patch of Bug #813426
(Assignee)

Comment 11

6 years ago
> Dear Dominic,
> 
> Maybe it is related to the timing of releasing wake lock.
> If music App released the wake lock after end of a song then system will go
> to suspend immediately.

Marco and Mike, Music releases wake lock only on pausing state.
And what Mike described will not enter the pausing state of Music,
so maybe it's not caused by releasing the wake lock. thanks.
(In reply to Dominic Kuo [:dkuo] from comment #10)
> 
> Hey Mike, can you provide me which commit of gaia you are using?

Hi Dominic, I will try to get this to you later today--my laptop hard drive has died and I'm in the middle of a backup/restore.

Comment 13

6 years ago
Hi, Mike, since this becomes another issue, we suggest to open a new issue to trace, is it ok?
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
(In reply to khu from comment #13)
>
> Hi, Mike, since this becomes another issue, we suggest to open a new issue
> to trace, is it ok?

Hi Dominic, I've been trying to reproduce this new problem on recent builds, and I can't seem to.  I'm willing to call it fixed.

gaia: b82adc129cfb681d08452184532a7d1faa548532
releases-mozilla-central: 8ed5ef4d2754920852049d4443217250ce738bd9

I'll file a new bug if it shows up again.
(Assignee)

Comment 15

6 years ago
Hey Mike, thanks for verifying this.
No problem.  I'm heavy music player user, so let me know if you need anything tested out.
You need to log in before you can comment on or make changes to this bug.