Rockbox

Tasklist

FS#11821 - iPod Colour: Database data aborts on init/update

Attached to Project: Rockbox
Opened by Hayden Pearce (St.) - Tuesday, 21 December 2010, 09:07 GMT
Last edited by sideral (sideral) - Friday, 04 March 2011, 19:05 GMT
Task Type Bugs
Category Database
Status Closed
Assigned To No-one
Operating System iPod 4G Color
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

r28861

I'm getting data aborts when I attempt to initialise the database when using the current build, it finds all the files fine, but fails on the second step (after reboot) during the 1~9 count.
I had thought it was possibly dodgy metadata tags in a file(s) so I tried adding small chunks to the DB at a time, but it also failed there too.
I worked out that it's not the files themselves from installing 3.7/.1 release build(s), the database updates and initialises as expected in these builds.
After that, if I then update the build to SVN head and add some tracks and update the database it aborts again so I have to turn auto update off and downgrade to the release build to add tracks to the database.
This is present for me on two different devices (iPod Colour 64GB CF and iPod Colour 60GB HDD).
This task depends upon

Closed by  sideral (sideral)
Friday, 04 March 2011, 19:05 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Closed upon request
Comment by sideral (sideral) - Tuesday, 21 December 2010, 13:49 GMT
One DB-related difference between 3.7.1 and SVN head that comes to mind is  FS#11723 . Can you try backing out the related changes (r28647, r28646, r28645; for your convenience, I've attached an experimental patch that does just that) and check whether the problem still occurs?
Comment by sideral (sideral) - Tuesday, 21 December 2010, 13:50 GMT
Oops, attached the wrong file. :-( Trying again.
Comment by Fraser McCrossan (joatca) - Sunday, 30 January 2011, 04:27 GMT
I built SVN tonight and I'm seeing the same problem (iPod Video). I'll try the patch you suggest tomorrow and report. However, FWIW, a debug build works, it's just a regular build that blows up.
Comment by Fraser McCrossan (joatca) - Sunday, 30 January 2011, 14:51 GMT
I applied your backout patch, but the build fails with:

/home/fraser/src/rockbox/apps/tagcache.c: In function ‘tagcache_fill_tags’:
/home/fraser/src/rockbox/apps/tagcache.c:1652: error: too many arguments to function ‘get_tag_numeric’

I generated my own backout patch after updating my tree:

svn diff -r28647:28644 > dbfix.patch
patch -p0 < dbfix.patch

...and the build fails with the same error.

I'm not at all familiar with the code but I'll take a look.
Comment by Fraser McCrossan (joatca) - Sunday, 30 January 2011, 15:11 GMT
I guess I should have waited before posting... :)

I made one change to the patched tagcache.c:

1652c1652
< id3->offset = get_tag_numeric(entry, tag_lastoffset, idx_id);
---
> id3->offset = get_tag_numeric(entry, tag_lastoffset);

I can confirm that the resulting build solves the data abort during database commit on my iPod Video, but I don't know the consequences of dropping the idx_id. The build appears to run normally so far.
Comment by sideral (sideral) - Monday, 07 February 2011, 00:00 GMT
The additional change you've made is correct.

If this patch fixes your problem, I'd love to help finding the real issue in the fix it reverts. Unfortunately I don't have an iPod (any make).

Is the issue reproducible (with the back-out patch removed) in the simulator?

Can you reproduce the issue with a small set of files that you could share with me?
Comment by sideral (sideral) - Monday, 07 February 2011, 13:53 GMT
One more (possibly obvious) question: Did you try removing the database files after upgrading, but prior to updating the database?

For the convenience of anyone else wanting to try the experimental patch: Here's an updated version of the patch that does not require additional manual changes.
Comment by sideral (sideral) - Tuesday, 15 February 2011, 22:01 GMT
Please also report the fault address reported on the data-abort screen and the function it corresponds to (or post the rockbox.map file from your build dir). Thanks!
Comment by sideral (sideral) - Friday, 04 March 2011, 17:44 GMT
Saint (who originally reported this bug) mentioned on IRC that his problem has been resolved, and that he thinks this issue could be closed.

joatca, I'd like to know whether you still need my experimental patch (which would indicate a problem in the code it removes). Could you please try an unpatched recent SVN version (not release 3.8)? I'd like to close this issue unless you report the problem persists.
Comment by Fraser McCrossan (joatca) - Friday, 04 March 2011, 18:05 GMT
Sorry, I no longer use the iPod (upgraded to an Android device) so I'm not able to test. Might as well close it.

Loading...