Bug 7133 - (int-153390) Shuffle all songs often plays a non-random sequence after the first song
(int-153390)
: Shuffle all songs often plays a non-random sequence after the first song
Status: RESOLVED FIXED
Product: Multimedia
Multimedia framework
: 5.0/(3.2010.02-8)
: All Maemo
: Low normal with 2 votes (vote)
: 5.0/(10.2010.19-1)
Assigned To: unassigned
: multimedia-framework-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2009-12-19 17:03 UTC by Dennis Ranke
Modified: 2010-08-11 13:53 UTC (History)
4 users (show)

See Also:


Attachments


Note

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


Description Dennis Ranke (reporter) 2009-12-19 17:03:25 UTC
SOFTWARE VERSION:
5.0/1.2009.42-11

EXACT STEPS LEADING TO PROBLEM: 
1. Start Media player (with a huge library of songs on the device)
2. Tap 'Shuffle all songs'
3. Let first song play to end or skip to the next song
4. Note the song index displayed for the next few songs

EXPECTED OUTCOME:

The songs played should be random.

ACTUAL OUTCOME:

Sequences of three tries:

2136(first song), 151, 271, 361, 421
2711, 61, 271, 331, 391, random songs from here
2236, 91, 151, 361, 631, 871, 1051, 1141, 1201, 1321, random from here

REPRODUCIBILITY:

4/10

It seems to occur more often after not using the media player for some time.
(For example, I noticed hearing some of the songs from the above sequences
nearly every day on may way to work.)

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:

I once saw something similar (increasing numbers ending with a 1) after
choosing "music" in the media player main menu, then choosing the "songs" view
and tapping on some song, when the song index display "x/y" started counting
up. Maybe that's related.
Comment 1 Andre Klapper maemo.org 2009-12-20 19:40:13 UTC
Thanks for reporting this.

So how many songs do you have in total?

> ACTUAL OUTCOME:
> Sequences of three tries:
> 2136(first song), 151, 271, 361, 421
> 2711, 61, 271, 331, 391, random songs from here
> 2236, 91, 151, 361, 631, 871, 1051, 1141, 1201, 1321, random from here

What did you do in-between? Restart Media Player, or restart the device? Any
additions to your music library or something?

Running the internal version 2009.51-8 (hence there might have been some fixes
in the meantime), having 592 songs here (a few of them ogg files but I do not
have ogg-support installed), always starting Media Player from the Application
menu (and not by clicking the Desktop Widget), and being lazy by clicking the
"Forward" button, I get:

1st try: 545, 141, 203, 538, 289, 109, 104, 116, 295, 229, 398
Reboot
2nd try: 468,  87, 289,  49, 213, 204, 211, 260, 350, 371, 358
Reboot
3rd try: 227, 137, 254, 344, 181, 432,  16, 559, 376, 310, 413

So I cannot see any pattern here.
Currently "moreinfo", I'd love to see a confirmation of this by a second user.
Comment 2 Dennis Ranke (reporter) 2009-12-20 20:04:43 UTC
I have 3177 songs on my N900, all of which are in aac format (except for the
preinstalled ones, no idea which format they are).

Quite typically, after writing this bug report, I didn't trigger the bug the
next 4-5 times I started music playback, then just now, on my way back home, I
again had to skip about 8 songs whose index ended with a 1 to get to random
playback.

I haven't added (or removed) any media files in the last two weeks. Usually,
when I experience this bug, I did since the last playback: close the media
player, let the N900 lie around a bit, maybe browse some websites, check for
new email, then start the media player again and start playback by going to
"Shuffle all songs". There is nothing really telling here, I guess. I didn't
restart the device.

I would love to be able to reproduce this more predictably, but so far, I had
no luck. One last (somewhat far fetched) idea is that it has something to do
with the time of day. It really often happened on my way to work, when I
usually start playback at 9:30 +- 1 minute.
Comment 3 Vladimir Oka 2010-01-11 18:05:17 UTC
I've noticed this, too, now that I read the original report.

I have a shade less than 1500 songs, all MP3. I sometimes start from the
widget, sometimes from the icon. I'd probably rate the frequency as less than
4/10 for the originator. Does this mean that the more songs you have the more
frequently this can happen.

I have been listening to these 1500 (OK, 1448) songs on various devices (MP3
players, 6110 Navigator, E71 -- both using built-in players and LCG Jukebox) so
I know them pretty well, and can easily tell when the sequence is not random
"enough". 

Another hint: on E71/6110 built-in media player also seems not to be random
"enough", while LCG Jukebox is *very* random. If N900 media player shares code
with S60 media player, it may indeed be that the problem is real.
Comment 4 Simon Butler 2010-01-15 17:21:02 UTC
I can also confirm this bug (with version 2.2009.51-1.203.2). I've been
noticing the same songs coming up, so I did the same steps as the bug reporter
(except I didn't skip any songs) and got these song indices (I have 2205 MP3s
in my collection):

388, 31, 121, 211, 271, 331, 391, 511, 601, 691, 751, 811, 871, 931, random
from here...

Assuming the shuffle feature should be selecting the songs from a uniform
distribution, the probability of getting a song ending in 1 is 1 in 10, so the
probability of getting a sequence of 13 songs all ending in 1: 1 in 10
trillion.

I then rebooted and tried again:
91, 151, 211, 301, 391, 481, 541, 601, 661, 721, 781, 841, 901, 961, 1021,
random from here...

Another sequence that has a 1 in 1 quadrillion chance... I think there is a bug
;-)

I then just restarted the media player:
405, 31, 91, 151, 271, 331, 391, random from here

Restarted media player again and skipped the first song: all random

Restarted media player again and allowed first song to play until the end, then
started skipping songs:
543, 121, 211, 271, 361, 451, 571, 661, 721, 781, 841, random...

So it would seem that for this bug to appear you need to let the first song
play out, then you can skip and get a highly-improbable random-length sequence
of songs ending in 1, then an adequately random sequence.
Comment 5 Andre Klapper maemo.org 2010-01-15 17:34:01 UTC
Confirming as per comments.
Comment 6 Andre Klapper maemo.org 2010-02-23 22:41:18 UTC
This has been fixed in package
mafw-shared 0.2.2010.06-1+0m5
which is part of the internal build version
10.2010.07-7
(Note: 2009/2010 is the year, and the number after is the week.)

A future public update released with the year/week later than this internal
build version will include the fix. (This is not always already the next public
update.)
Please verify that this new version fixes the bug by marking this bug report as
VERIFIED after the public update has been released and if you have some time.


To answer popular followup questions:
 * Nokia does not announce release dates of public updates in advance.
 * There is currently no access to these internal, non-public build versions.
   A Brainstorm proposal to change this exists at
http://maemo.org/community/brainstorm/view/undelayed_bugfix_releases_for_nokia_open_source_packages-002/
Comment 7 Andre Klapper maemo.org 2010-03-15 20:55:41 UTC
Setting explicit PR1.2 milestone (so it's clearer in which public release the
fix will be available to users).

Sorry for the bugmail noise (you can filter on this message).
Comment 8 timeless 2010-05-10 10:30:49 UTC
since the code is open, the fix was in rev 830 of this file:
http://vcs.maemo.org/svn/mafw/trunk/mafw-shared/mafw-playlist-daemon/aplaylist.c
Comment 9 Tuoyo Ejueyitchie 2010-08-11 13:53:49 UTC
Hi it seems this was fixed on PR 1.2 but it is not fixed on my device.  When I
select shuffle all songs the songs always play in the same sequence each time. 
For example if the sequence is 4, 2, 1, 3 and I select song 2, the next song to
play is always song 1 so it is not random at all.