Rockbox

Tasklist

FS#12234 - Simulator crashes when playing mp3 file with cuesheet

Attached to Project: Rockbox
Opened by Michael Chicoine (mc2739) - Wednesday, 17 August 2011, 01:58 GMT
Last edited by Michael Sevakis (MikeS) - Monday, 22 August 2011, 00:18 GMT
Task Type Bugs
Category Simulator
Status Closed
Assigned To No-one
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

Playing an mp3 file with cuesheet causes the simulator (linux and w32) to crash. The same setup on the actual device works properly.

The position of the mp3 file in the playlist can change the results (i.e. proper operation).

The last working revision is r29784 and the first failing rev (that builds) is r29789


Linux sim r30322 fails with the following gdb message:

Program received signal SIGSEGV, Segmentation fault.
cuesheet_subtrack_changed (id3=0x81a3790)
at /home/mc2739/rockbox/apps/cuesheet.c:377
377 || (cue->curr_track_idx < cue->track_count - 1
This task depends upon

Closed by  Michael Sevakis (MikeS)
Monday, 22 August 2011, 00:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  r30337 - OP reports the patch effective
Comment by Jonathan Gordon (jdgordon) - Wednesday, 17 August 2011, 02:05 GMT
if "The position of the mp3 file in the playlist can change the results (i.e. proper operation)." affects anything then you must give a better repro setup.
Comment by Michael Chicoine (mc2739) - Wednesday, 17 August 2011, 03:47 GMT
Test setup used r30322 with no modifications and no configuration changes with the exception of enabling cuesheet support.

I have two mp3 files in separate folders. One of the mp3 files has a cuesheet that divides the song into 3 subtracks. There is no album art in the folders or id3 tags.

I have created two playlists. the first playlist has the mp3 with the cuesheet first, and the other playlist has it last.

When the first playlist is started, the cuesheet mp3 plays properly and subtracks are shown. Skipping to the next/previous subtrack or track also works properly. If repeat all is enabled, skipping forward from the second track to the first works properly.

To trigger the crash,

1. Start the sim - make sure cuesheet support is enabled
2. Start the second playlist - the first song should be playing
3. Skip forward to play the second song (with cuesheet) - if the first track plays through completely, when the second track (with cuesheet) starts, there is no crash.
4. The sim should crash

or,

1. Start the sim - make sure cuesheet support is enabled
2. Start the first playlist and skip to the second track
3. Exit the sim and restart - this is required to trigger the crash - if the first song has played, it will not crash
4. Enable Repeat All
5. Resume playback - the second song should be playing
6. Skip forward to play the first song (with cuesheet) - if you skip backward into the first song, it will not crash
7. The sim should crash
Comment by Michael Sevakis (MikeS) - Sunday, 21 August 2011, 22:54 GMT
This sets the cuesheet pointer to NULL when it has to read directly from the buffer to do lookaheads for manual skips. id3->cuesheet is set during buffering so that it is known that a cuesheet exists for later on when the track becomes current. It wouldn't be valid when looking ahead, which might bother the sim with memory protection but not the target. I hadn't actually run this change myself.

Loading...