FS#3021 - "Auto Change Directory" keeps repeating last track forever

Attached to Project: Rockbox
Opened by Dave Hooper (stripwax) - Monday, 13 February 2006, 19:20 GMT
Last edited by Christi Scarborough (christi-s) - Sunday, 19 March 2006, 12:41 GMT
Task Type Bugs
Category Playlists
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Immediate
Reported Version
Due in Version Version 3.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


If the 'auto change directory' option is selected,
then normally selecting a track to play from the file
browser will cause a playlist of that folder to be
generated, playback will continue to the next track in
that folder, and then when the last track in that
folder has played playback will continue to the first
track in the next directory in the filesystem.

However, if a plugin is running (e.g. a game), or even
if a non-filebrowser browser menu is open (e.g. browse
for themes, browse for plugins), then when the last
track in the folder has played, it will restart
playing that same last track again. This will
continue indefinitely.

The problem seems to be that the Auto Change Directory
logic expects the current working directory to be the
same as the currently playing track. However when
browsing for themes or running a plugin, the current
working directory is something else, the auto change
directory logic cannot find the currently playing
track (hence cannot find the *next* playing track),
and it seems to fall back on re-playing the same track
again. The above investigation might not be correct
though due to my lousy gdb skillz.
This task depends upon

Closed by  Hardeep Sidhu (hardeeps)
Tuesday, 18 April 2006, 16:33 GMT
Reason for closing:  Fixed
Comment by Anonymous Submitter - Monday, 13 February 2006, 21:38 GMT

I was unable to reproduce with the latest build on an H300.
Do you still see it?
Comment by Dave Hooper (stripwax) - Wednesday, 15 February 2006, 12:01 GMT

Yes. Thanks, nobody, but this is still easily
reproducible, with the latest bleeding edge code, on an
H120. I'd imagine the effect would be on an H300 also. I
have Directory Cache enabled but I'm fairly certain that
doesn't affect this bug (will check).

Simply follow the above instructions: with Auto Change
Directory enabled, select a file from the file browser (not
tag view, but file directory), load and run a plugin (e.g.
Bejewelled, as mentioned in the above forum thread) and
keep the plugin open while the music continues, and when
the last track in the folder has finished playing you will
observe that it repeats the last track again, and does not
advance to the next folder. Compare to the behaviour if
you do not load and run a plugin while the music is playing
(e.g. leave the player on the WPS screen), and the track
change to the next directory will happen.
Comment by Hardeep Sidhu (hardeeps) - Tuesday, 18 April 2006, 16:33 GMT
This should be fixed in latest CVS. Please verify.