rhythmbox corrupts ipod database for black 8GB ipod nano (B754)

Bug #461639 reported by Rocko
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Rhythmbox
Fix Released
Medium
libgpod (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: rhythmbox

If I transfer mp3 files to my iPod using Karmic's Rhythmbox and then eject it, the iPod reports it had no music on it. Rhythmbox and nautilus are able to see the files on the iPod, so it must be a database corruption problem.

I tried rebuilding the database several times in Karmic by deleting the iPod's iTunes and Music folders, remounting it and reinitializing it when Rhythmbox asked, and finally recopying mp3 files to it using Rhythmbox, but after ejecting the iPod always reported it had no music files on it.

I then rebooted into Jaunty and rebuilt the database followed the same procedure. This restored the iPod correctly so that it could see the mp3 files again.

ProblemType: Bug
Architecture: amd64
CheckboxSubmission: 1bd8e90541d49b96c13cbfcc9baf103b
CheckboxSystem: d00f84de8a555815fa1c4660280da308
Date: Tue Oct 27 11:18:40 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: rhythmbox 0.12.5-0ubuntu4
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: rhythmbox
Uname: Linux 2.6.31-02063105-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:2730): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2730): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2835): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2817): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:2815): Gdk-WARNING **: /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window

Revision history for this message
Rocko (rockorequin) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in rhythmbox (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Revision history for this message
Rocko (rockorequin) wrote :
Changed in rhythmbox (Ubuntu):
status: New → Triaged
status: Triaged → Confirmed
status: Confirmed → Triaged
status: Triaged → Incomplete
Revision history for this message
Rocko (rockorequin) wrote :

An update (see gnome-bugs #599772): I can reproduce this problem on a VM running Karmic. The problem is that Karmic's libgpod4 library is not writing a required checksum to the iPod's iTunesDB database file.

Using Jaunty's libgpod4 library instead of Karmic's works, so the problem is in libgpod4 0.7.2-1ubuntu1.

affects: rhythmbox (Ubuntu) → libgpod (Ubuntu)
Changed in libgpod (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Incomplete → New
affects: libgpod (Ubuntu) → rhythmbox (Ubuntu)
affects: rhythmbox (Ubuntu) → libgpod (Ubuntu)
Revision history for this message
Rocko (rockorequin) wrote :

An update: this bug is specific to the 8GB black nano iPod with last 3 digits of the serial number "3R0" (the last character is the number zero). libgpod.4.1.0 is looking for "3RO" (the character "O") when trying to identify the model number.

A workaround is to use libgpod.4.0.0 from Jaunty.

Changed in libgpod (Ubuntu):
status: New → Confirmed
summary: - rhythmbox corrupts ipod database
+ rhythmbox corrupts ipod database for black 8GB ipod nano (B754)
Revision history for this message
Rocko (rockorequin) wrote :

This has been fixed in libgpod git (see https://bugzilla.gnome.org/show_bug.cgi?id=599772#c24).

Is this likely to be imported into Karmic or would it be better for Ubuntu to patch it?

Details of the fix: change line 661 of itdb_device.c from:

    { "3RO", "B754" }, /* 8GB Black Nano 4g */

to

    { "3R0", "B754" }, /* 8GB Black Nano 4g */

(ie with a zero instead of an O).

Revision history for this message
Matthew Lewellen (lewellen) wrote :

Are there any updates on who will take responsibility with releasing the patch?

My "blank" black iPod wants to know...

Revision history for this message
Rocko (rockorequin) wrote :

You could try this to patch the binary library; it works on my amd64 box because the 3RO string only appears once in the library.

First ensure Rhythmbox is NOT running (killall rhythmbox will do the trick) and then:

# Get root privileges
sudo -s
cd /usr/lib
# Convert libgpod.so.4.1.0 to hex and swap out "3RO" for "3R0", then convert back to binary. eg 33524f is "3RO" in hex
xxd -g8 libgpod.so.4.1.0 | sed s/33524f/335230/ | xxd -r > libgpod.so.4.1.0-fix
# Changeover the link to use the new binary
rm libgpod.so.4
ln -s libgpod.so.4.1.0-fix libgpod.so.4

Afterwards, run rhythmbox. If it worked, all should be fine. If something went wrong, it'll tell you that it can't activate the ipod plugin. You'll need to shut it down, run gconf-editor and search for /apps/rhythmbox/plugins/ipod and set active to true to get it to try next time. And, of course, restore the link to the old (broken) libgpod.so.4.1.0.

Revision history for this message
Rocko (rockorequin) wrote :

Just noting that the above xxd command line is one line. It appears over two lines in launchpad.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your work on that issue

Changed in libgpod (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Kallewoof (kalle-enrogue) wrote :

Rocko, you are seriously awesome! Your on-the-fly patch worked like a charm for me.

Revision history for this message
Giovanni (g-firmani) wrote :

I have the same problem with my Classic (silver - Gb 160) iPod B145. Is the solution that Rocko suggested good for this model?
My Serial no. ends with 9ZS

Thank you
Gio

Revision history for this message
Rocko (rockorequin) wrote :

@Gio: the fix won't work, because it is only for the ipod with serial number ending in 3R0. Your serial number (9ZS) doesn't appear in the source, so maybe it's a new model.

You could try installing the Jaunty deb package to see if it works better:

32 bit Ubuntu: https://launchpad.net/ubuntu/jaunty/i386/libgpod4/0.7.0-1
64 bit Ubuntu: https://launchpad.net/ubuntu/jaunty/amd64/libgpod4/0.7.0-1

This might work because it seems that the Jaunty package always writes the checksum even if it doesn't know the model.

Revision history for this message
Giovanni (g-firmani) wrote :

Thank you very much for your suggestion. I managed to downgrade libgpod4 and I can now make my iPod work. Thank you again.
Gio

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgpod - 0.7.90git20100210-0ubuntu1

---------------
libgpod (0.7.90git20100210-0ubuntu1) lucid; urgency=low

  * Updated to current git which uses udev now
  * debian/control, debian/patches/10_hal-kfreebsd.dpatch, debian/rules:
    - don't use hal, update binary description
  * debian/patches/90_clean_symbols_export.dpatch:
    - dropped, the change is in git now

libgpod (0.7.90-0ubuntu1) lucid; urgency=low

  * New upstream version (lp: #518490):
    - iPhoneOS 3.x support. This requires a working libimobiledevice
      stack and a device initialized once by iTunes.
    - iPod Nano 5G support (lp: #500650)
      The device database needs to be initialized by iTunes once.
    - iPod Classic 3G support
    - fix iPod Nano 4G 4GB serial number (lp: #461639)
    - properly read timezone information from iPod Classic and Nano 4G
    - artwork writing bug fixes
    - iTunesDB reading bug fixes
    - add code sample showing how to copy a file to the iPod
    - export podsleuth-like information to HAL
  * debian/control:
    - build-depends on libsqlite3-dev, libplist-dev, libusb-1.0-0-dev,
      zlib1g-dev
    - don't use libimobiledevice yet there is still some issues to fix there
  * debian/patches/90_clean_symbols_export.dpatch:
    - set some variables to static so they don't get exported in the library
 -- Sebastien Bacher <email address hidden> Wed, 10 Feb 2010 15:08:19 +0100

Changed in libgpod (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
James Sheldon (voyager640) wrote :

Ok, so, I'm having the same bug, but I'm running karmic. is there a way to install the version of libgpod from lucid into karmic?

0.7.90 is not available for karmic:
https://launchpad.net/ubuntu/karmic/i386/libgpod4

but is for lucid:
https://launchpad.net/ubuntu/lucid/i386/libgpod4

Revision history for this message
James Sheldon (voyager640) wrote :

I have an iPod ending in 3R0. I am running karmic (9.10) but manually installed the .deb package from lucid. I'm now running libgpod 0.7.90. I checked the library, and the patch is indeed installed. But it hasn't fixed my problem. It still shows 'no music' on my iPod. Perhaps rhythmbox isn't rewriting the checksum?

Revision history for this message
Rocko (rockorequin) wrote :

I just tried libgpod 0.7.90git20100216-0ubuntu3 in Lucid, and it works fine.

When you upgraded, did you uninstall the old package first? You can check whether Rhythmbox is using the old or new library with:

ls -l /usr/lib/libgpod.so.4*

eg mine shows

lrwxrwxrwx 1 root root 16 2010-02-27 00:22 /usr/lib/libgpod.so.4 -> libgpod.so.4.2.0

If it is linked to libgpod.so.4.1.0, you will be using the old version. To make it use the new version:

# Remove the link
sudo rm /usr/lib/libgpod.so.4

# Re-link it
sudo ln -s /usr/lib/libgpod.so.4.2.0 /usr/lib/libgpod.so.4

# Restart rhythmbox in background
killall rhythmbox
rhythmbox &

If it's linked correctly, it's possible that Rhythmbox hasn't loaded the new library yet. Logging in and out again should fix this, or you can try the restart command above.

Revision history for this message
James Sheldon (voyager640) wrote :

Logging in and out didn't fix it, but leaving everything alone for a day seemed to help-- suddenly the iPod is working again. Very strange!

Changed in rhythmbox:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
titagula (titagula) wrote :

Rocko, how could i " use libgpod.4.0.0 from Jaunty" ? help me please!

Revision history for this message
Rocko (rockorequin) wrote :

Well, I copied it from the /usr/lib folder in a Jaunty installation and then changed the symlink /usr/lib/libgpod.so.4 to point to the newly copied file.

But is fixed in Ubuntu 10.04 and 10.10, so why wouldn't you just upgrade?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.