Rockbox

Tasklist

FS#8077 - MP3 playbacks stops sometimes when usefl nears 0

Attached to Project: Rockbox
Opened by Bertrik Sikken (bertrik) - Saturday, 03 November 2007, 00:08 GMT
Last edited by Brandon Low (lostlogic) - Sunday, 04 November 2007, 05:55 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To Brandon Low (lostlogic)
Operating System Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

MP3 playbacks sometimes stops, at that point the usefl value in the buffering thread debug menu is close to 0. Tested using SVN 15412.

Reproduction recipe:
* Use the database to start playback of an album full of mp3s
* Enter the buffering thread debug menu
* Use the scroll wheel to skip forward. This causes the usefl bar to diminish. Continue skipping until it is almost at zero, then let it play down to zero.
* About every other time, the playback completely stops at this point. During playback, the pcm, alloc and real bars were nearly full. When the problem occurs, the real bar is suddenly empty and the pcm quickly drops down to 0, then playback stops. Usefl shows a low number (not 0), like 16k or 18k.
* The Sansa is in a confused state now, stopping the song causes a hang, shutting down shows the 'shutting down...' splash but takes very long (15 sec or so).

This may be related to  FS#8037 ,  FS#8073 ,  FS#8074  because symptoms appear to be similar.

Attached are two logf's (logf enabled in playback.c and buffering.c).
This task depends upon

Closed by  Brandon Low (lostlogic)
Sunday, 04 November 2007, 05:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  It is possible to kill gremlins.
Comment by Bertrik Sikken (bertrik) - Saturday, 03 November 2007, 09:25 GMT
I tested some newer versions from last night:
* Up to SVN 15424 the problem remains
* For SVN 15425 and later, I cannot reproduce this problem anymore

However, the usefl bar is now mostly empty instead of mostly full when playing/skipping forward.
The amount of usefl data seems to be equal to the size of the currently playing mp3.
Comment by Brandon Low (lostlogic) - Saturday, 03 November 2007, 13:26 GMT
Thanks for the quick test update bertrik. So there's still definitely a problem on Sansa where it doesn't fill the buffer completely, but we're getting closer to resolved ;) I actually think I dreamt the solution here.
Comment by Brandon Low (lostlogic) - Saturday, 03 November 2007, 14:01 GMT
Crap, this happens outside of sansa, at least i can reproduce this new part.
Comment by Bertrik Sikken (bertrik) - Saturday, 03 November 2007, 18:54 GMT
Here a logf from the problem on a sansa e260, SVN 15436.
About half the time when usefl approaches 0, playback stops. When playback doesn't stop, usefl correctly fills back up to maximum.
   logf.txt (8.3 KiB)
Comment by Bertrik Sikken (bertrik) - Saturday, 03 November 2007, 19:08 GMT
Here's another logfile from SVN 15436, now with LOGQUEUES enabled for both playback and buffering.
   logf.txt (8.3 KiB)
Comment by Bertrik Sikken (bertrik) - Saturday, 03 November 2007, 19:10 GMT
Oops, wrong file at 20:08 GMT+1
Here's the logfile from SVN 15436, now with LOGQUEUES enabled for both playback and buffering.
   logf.txt (7.4 KiB)
Comment by Bob Jones (aquabanianskakid) - Sunday, 04 November 2007, 03:00 GMT
Is this the same problem as  FS#8081 ?
Comment by Brandon Low (lostlogic) - Sunday, 04 November 2007, 05:55 GMT
First, I want to sincerely thank bertrik, hcs and emeraldd for all of their kind testing support and patience on this bug hunt. We've managed to fix probably a dozen small issues with buffering before finally finding the root cause that was preventing it from recovering from even the slightest miscue.

Second, die gremlin die.

Loading...