From: Paul G. R. <p.g...@ph...> - 2006-01-07 17:32:58
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, Am new to this list so greetings, thanks for the library and please indulge me if this has been asked before. I am running libgpod.so from a second gpod library that I have given the jni treatment so I can call it from java (dont ask, I wanted to see if I could do jni!!). Anyway... I compile and run the following code from a function in the library: itdb = itdb_parse ((const gchar *) podmp, &error); printf("Error: %s\n", error->message); return (jint) itdb; This returns the following output/error: Entry Length = 18 Error: iTunesStats file ('/mnt/mdrive/iPod_Control/iTunes/iTunesStats'): entry length smaller than expected (18<18). The "Entry Length" line is a debug printf I have stuck in the code to verify the entry_length. This error comes from src/itdb_itunesdb.c (as you probably know) as follows: static gboolean itunesstats_read (FImport *fimp, FContents *cts) { ... guint32 entry_length = get24lint (cts, seek+0); CHECK_ERROR (fimp, FALSE); printf("Entry Length = %d\n", entry_length); if (entry_length < 0x18) { g_set_error (&fimp->error, ITDB_FILE_ERROR, ITDB_FILE_ERROR_CORRUPT, _("iTunesStats file ('%s'): entry length smaller than expected (%d<18). "), cts->filename, entry_length); return FALSE; } <snip> I am no expert on this library's functions hence using the library so can you explain why this error is occurring. Can you explain: 1) The error message says 18<18 which seems an odd kind of error? 2) 0x18 is 24 which seems to tie up with the function get24lint? 3) When I do change the if operation down to entry_length < 0x12, the entire library segfaults which implies the error message is incorrect? 4) The ipod I am trying to read is an ipod shuffle with no firmware upgrades. Do I need firmware upgrades for this to work? Any help, greatly appreciated. Regards Paul (a.k.a phantomjinx) - -- P.G. Richardson Email: p.g...@ph... - --- "There is no present or future, only the past happening over and over again now." Eugene O'Neille "History is the nightmare from which I am trying to awake." James Joyce -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFDv/s8cthLMIwdEb0RAiJsAKCkDcL56AUDrJvnDu9U4wnM4RP12gCfULsK /LN4nMI1/1j+s7q7t8aspoY= =8w0u -----END PGP SIGNATURE----- |