#173 libgpod received signal SIGBUS

2.1.4
closed-out-of-date
nobody
libgpod (41)
5
2014-08-09
2009-04-03
Guitch
No

for a few time, whenever I try to launch a program using libgpod (gtkpod, amarok), it crashes. After compiling the latest libgpod with debugging options on, gdb gives me this :

Program received signal SIGBUS, Bus error.
[Switching to Thread 0xb6b0e730 (LWP 27516)]
0xb7456679 in strncpy () from /lib/libc.so.6
(gdb) bt
#0 0xb7456679 in strncpy () from /lib/libc.so.6
#1 0xb7860556 in g_strndup () from /usr/lib/libglib-2.0.so.0
#2 0xb7659e93 in db_parse_context_get_m_header_internal (ctx=0x8678670, id=0xb76749f2 "mhod", size=24)
at db-parse-context.c:149
#3 0xb76558b6 in parse_mhod_string (ctx=0x86715a0, error=0x867866f) at db-artwork-parser.c:128
#4 0xb76561e7 in parse_mhii (ctx=0x861d358, error=0x0) at db-artwork-parser.c:169
#5 0xb76557d9 in parse_mhl (ctx=0x861d330, error=<value optimized out>, id=0xb7674a67 "mhli",
parse_child=0xb7655bf0 <parse_mhii>) at db-artwork-parser.c:427
#6 0xb7656589 in parse_mhfd (ctx=0x861d780, error=<value optimized out>) at db-artwork-parser.c:464
#7 0xb7656bf0 in ipod_parse_artwork_db (itdb=0x8615a80) at db-artwork-parser.c:712
#8 0xb766906b in itdb_parse (mp=0x8565868 "/mnt/usbkey", error=0xbfdf7a48) at itdb_itunesdb.c:3021
#9 0x0809eb6f in gp_import_itdb ()
#10 0x0809f39a in gp_load_ipod ()
#11 0x08063c8b in _start ()

Other informations :
libgpod 0.7.0 (tried 0.6.0 too)
20Gb ipod photo
libgpod compiled using gcc version 4.3.3 (Debian 4.3.3-5)
kernel 2.6.28
libc6-i686 2.9-6

I tried to debug it, but I don't have much free time.
By adding :

MHeader *h;
h = (MHeader *)ctx->cur_pos;
printf ("debug : parse_mhod_3 start %s\n",h->header_id);

in file db-artwork-parser.c line 170, I get about 60 lines like this :
debug : parse_mhod_3 start mhod▒

and :

(gdb) bt
#0 0xb7428363 in strlen () from /lib/libc.so.6
#1 0xb73f7a66 in vfprintf () from /lib/libc.so.6
#2 0xb73fd990 in printf () from /lib/libc.so.6
#3 0xb762827f in parse_mhii (ctx=0x861d610, error=0x0) at db-artwork-parser.c:172
#4 0xb76278af in parse_mhl (ctx=0x861d7c8, error=<value optimized out>, id=0xb7647510 "mhli",
parse_child=0xb7627c70 <parse_mhii>) at db-artwork-parser.c:457
#5 0xb76286d9 in parse_mhfd (ctx=0x866d770, error=<value optimized out>) at db-artwork-parser.c:496
#6 0xb7628d60 in ipod_parse_artwork_db (itdb=0x8615e98) at db-artwork-parser.c:759
#7 0xb763ba8b in itdb_parse (mp=0x85aedd0 "/mnt/usbkey", error=0xbfacaf28) at itdb_itunesdb.c:3033
#8 0x0809eb6f in gp_import_itdb ()
#9 0x0809f39a in gp_load_ipod ()
#10 0x08063c8b in _start ()

Thank you for your help.

Discussion

  • Nobody/Anonymous

    Can you provide your ArtworkDB file ?

     
  • Guitch

    Guitch - 2009-04-04

    ArtworkDB file

     
  • Guitch

    Guitch - 2009-04-04

    Here it is. The file seems corrupted : got an Input/output error when I tried to copy it, but if cp or cat can handle the corrupted file so should libgpod, right ?
    I uploaded what I could salvage from the original file, but a fsck destroyed the original file on the ipod. The upside is that libgpod no longer crashes.
    Thanks for the insight.

     
  • phantomjinx

    phantomjinx - 2014-08-09
    • status: open --> closed-out-of-date
    • Group: --> v1.0_(example)
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks