This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9827 - Rockbox data Abort at 000090D0 (0)
Attached to Project:
Rockbox
Opened by Gareth (Mystic_kitsune) - Sunday, 25 January 2009, 19:38 GMT+1
Last edited by Nils Wallménius (nls) - Sunday, 22 February 2009, 11:30 GMT+1
Opened by Gareth (Mystic_kitsune) - Sunday, 25 January 2009, 19:38 GMT+1
Last edited by Nils Wallménius (nls) - Sunday, 22 February 2009, 11:30 GMT+1
|
Detailsrockbox aborts at the address 000090D0 (0) with build 19852 while playing any music file, the buffers all fill synchronously and the abort happens after they all fill.
|
This task depends upon
Closed by Nils Wallménius (nls)
Sunday, 22 February 2009, 11:30 GMT+1
Reason for closing: Fixed
Additional comments about closing: fixed in r20081
Sunday, 22 February 2009, 11:30 GMT+1
Reason for closing: Fixed
Additional comments about closing: fixed in r20081
Also, please be more descriptive. Unless you've tested every audio format and encoding option Rockbox supports, "any file" may not be correct, so list details that can be used by others to reproduce (what settings you've changed, exact file types, etc). Also, this is a build you downloaded from our site, and not one you compiled yourself?
It happens when I browse the database and select <All tracks> in my "Various Artists" album artist node. In this node, the tracks are of different formats. Maybe the metadata gathering of the first unbuffered track is involved.
There were no file system errors on my microSD (checked with chkdsk) and a binary comparison to the "master" music directory on my PC also showed no differences, files work perfectly there).
If I remember correctly, amiconn also tracked it back to the add_handle function.
90d0: e5843000 str r3, [r4]
90d4: e2833001 add r3, r3, 0x1
90d8: e3c33102 bic r3, r3, 0x80000000
which is:
new_handle->id = cur_handle_id;
in add_handle code. So "new_handle" seems to be invalid here.
The disassembly of that part (add_handle() ): http://pastebin.ca/1333249
Note that Toni's line is way below ( 9498: e5853000 str r3, [r5] )
And another note: Even though my playlist reproduces the data abort prefectly (after cold boot), the data abort disappears by just slightly altering the buffersize (e.g. by adding logf support, or disabling dircache and load to ram), or by resuming playback at a few seconds into the first track of the playlist instead of 0.
My observation is that the 6th track is just with very few bytes in the buffer and that the abort happens very quickly after track count goes to 6 . The data abort happens when buffering is finished. Possibly split seconds later (I could imagine that buffering the metadata of the first unbuffered track causes some failure).
However, this is not the case for Marianne's folder, so partial buffering seems not related.
BUT: On the very album that causes the abort (without the patch), Rockbox doesn't stop boosting when buffering is finished. It unboosts normally on other albums. Maybe this is a hint on the real problem.
Can you look if the patch fixes it for you anyway?
With current code I basically get following logics after removing the macros:
else if(!can_wrap)
{
if(new_widx < buffer_len-1)
{
if(new_widx + sizeof(struct memory_handle) + data_size > buffer_len-1)
new_widx = buffer_len-1 - sizeof(struct memory_handle);
}
}
which is buggy, because:
1) It can overwrite data from the previous handle
2) It will use the guard buffer by default for data storage
3) If the guard buffer is too small unrelated data can be overwritten
To my understanding the correct logic is as follows:
else if(!can_wrap)
{
if(new_widx + len > buffer_len)
new_widx = 0; /* wrap to the start */
}
if (filling != STATE_FILLING) {
cancel_cpu_boost();
}
I made it after your logic. If you think your logic is correct (or, rather at least more correct than what's in SVN), go ahead and commit it :)