Rockbox

Tasklist

FS#11255 - Resuming wav playback crashes the player

Attached to Project: Rockbox
Opened by Jeffrey Goode (Blue_Dude) - Sunday, 09 May 2010, 01:40 GMT
Last edited by Jeffrey Goode (Blue_Dude) - Sunday, 09 May 2010, 20:02 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System SW-codec
Severity High
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

To reproduce:

Play a wav file.
Stop playback.
Turn of the player.
Turn on the player, then select Resume Playback.
Player crashes.

Occurs in r25904, discovered in e200 sim.
This task depends upon

Closed by  Jeffrey Goode (Blue_Dude)
Sunday, 09 May 2010, 20:02 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r25919
Comment by Paul Louden (Llorean) - Sunday, 09 May 2010, 01:53 GMT
Cannot reproduce on Gigabeat S with r25904. Further details for reproducing, please.
Comment by Jeffrey Goode (Blue_Dude) - Sunday, 09 May 2010, 12:25 GMT
The file I used to reproduce the bug can't be posted here, but here's the sim console information when selecting Properties on it:

wave header info ----
format: 0001
channels: 2
blockalign: 4
bitspersample: 16
samplesperblock: 1
totalsamples: 6849165
numbytes; 27396660
id3 info ----
frquency: 44100
bitrate: 1411
length: 155309

The typos are in the original by the way (semi colon for colon, "frquency")

Also perhaps of significance is that there is other metadata in the wav file: artist and title tags.

Confusingly, the "Time" information in the properties screen is incorrect on all files. They're different on all the wav files, and all the flac files show "2:00". I don't know what it's supposed to represent, but in this file it says "23:40". The Duration is correct at 2:35.
Comment by Jeffrey Goode (Blue_Dude) - Sunday, 09 May 2010, 13:13 GMT
I made an identical wav file to the problematic one, this time without metadata. It worked.

The only difference between the two files is the one that behaves only contains audio chunks. The one that doesn't contains a metadata chunk at the end. Other than the metadata chunk they are identical, except for two bytes in the header. Those two bytes are the low end bytes of a four byte integer describing the total chunk size of the wav file.

My guess is that for some reason, the parser is not ignoring the metadata but somehow tries to read it as an audio subchunk. In other words, the parser assumes that if a subchunk exists in the total count, it must be audio. Then it tries to read the metadata subchunk info as an audio subchunk and crashes.
Comment by Jeffrey Goode (Blue_Dude) - Sunday, 09 May 2010, 20:02 GMT
The problem was in the metadata parser. Fixed.

Loading...