Bug 1298720 - Cannot copy tracks to ipod classic
Cannot copy tracks to ipod classic
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gtkpod (Show other bugs)
23
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-14 14:41 EST by Albert Flügel
Modified: 2016-02-07 22:23 EST (History)
3 users (show)

See Also:
Fixed In Version: gtkpod-2.1.5-2.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-07 22:23:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace of gtkpod during the error (135.50 KB, application/x-xz)
2016-01-20 15:06 EST, Albert Flügel
no flags Details
Patch to enable the m4a "plugin" (702 bytes, patch)
2016-01-26 15:17 EST, Albert Flügel
no flags Details | Diff
Modified SPEC file to build gtkpod with support for m4a files (without conversion) (8.68 KB, text/plain)
2016-01-26 15:19 EST, Albert Flügel
no flags Details
diff of the original and modified spec file as requested (572 bytes, patch)
2016-01-27 14:28 EST, Albert Flügel
no flags Details | Diff
gtkpod.spec.patch (987 bytes, patch)
2016-01-28 20:29 EST, Sergio Monteiro Basto
no flags Details | Diff
gtkpod-m4a.diff (405 bytes, patch)
2016-01-28 20:42 EST, Sergio Monteiro Basto
no flags Details | Diff

  None (edit)
Description Albert Flügel 2016-01-14 14:41:42 EST
Description of problem:
When trying to copy tracks (file or directory) to an ipod classic using gtkpod, an error message pops up "Some directories were not added successfully"  and nothing is put to the ipod.

Version-Release number of selected component (if applicable):
2.1.5-1.fc23

How reproducible:
connect ipod, start gtkpod. You see indeed the albums and tracks available on the ipod.

Steps to Reproduce:
1. Connect iPod via USB
2. let it mount (is visible as vfat mount, rw)
3. Click on the button with the name of the ipod in gtkpod
4. Click th button "Add directory to the selected iPod" or Button "Add file..."
5. In the popup window browse to the desired directory or file to be added
6. press the Add button

Actual results:
Window pops up stating "Some directories were not added successfully"
Nothing is added to the iPod. The ipod shows shortly "Synchronizing".

Expected results:
Audio Tracks are added to the iPod

Additional info:
* It had worked with banshee in Fedora 21
* Banshee now doesn't even recognize the device
* Amarok recognizes the device, but there seems no way to tracks to it in amarok
* rhythmbox recognizes the device, but does not even show the contained tracks.
* In a file manager or in a shell the contents of the ipod is visible normally under /run/media/<username>/<ipod-name>
* This device is several years old (ipod classic) and it had worked before
* Could be it is a problem of an underlaying component, library or what.
Comment 1 Gwyn Ciesla 2016-01-20 11:05:13 EST
My ipod classic went to the great beyond a few years back so I can't test directly. . .do you see anything odd in dmesg after pluggin it is?
Comment 2 Albert Flügel 2016-01-20 15:05:26 EST
I don't recognize anything weird in the syslog, when plugging in the ipod:

Jan 20 20:38:48 star34 kernel: usb 1-1.3: new high-speed USB device number 4 using xhci_hcd
Jan 20 20:38:48 star34 kernel: usb 1-1.3: New USB device found, idVendor=05ac, idProduct=1261
Jan 20 20:38:48 star34 kernel: usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 20 20:38:48 star34 kernel: usb 1-1.3: Product: iPod
Jan 20 20:38:48 star34 kernel: usb 1-1.3: Manufacturer: Apple Inc.
Jan 20 20:38:48 star34 kernel: usb 1-1.3: SerialNumber: 000A2700213F79CD
Jan 20 20:38:48 star34 kernel: usb-storage 1-1.3:1.0: USB Mass Storage device detected
Jan 20 20:38:48 star34 kernel: scsi host11: usb-storage 1-1.3:1.0
Jan 20 20:38:48 star34 mtp-probe: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:0a.0/0000:03:00.0/usb1/1-1/1-1.3"
Jan 20 20:38:48 star34 mtp-probe: bus: 1, device: 4 was not an MTP device
Jan 20 20:38:49 star34 kernel: scsi 11:0:0:0: Direct-Access     Apple    iPod             1.62 PQ: 0 ANSI: 0
Jan 20 20:38:49 star34 kernel: sd 11:0:0:0: Attached scsi generic sg10 type 0
Jan 20 20:38:49 star34 kernel: sd 11:0:0:0: [sdh] Spinning up disk...
Jan 20 20:38:55 star34 kernel: .ready
Jan 20 20:38:55 star34 kernel: sd 11:0:0:0: [sdh] 39023511 4096-byte logical blocks: (156 GB/148 GiB)
Jan 20 20:38:55 star34 kernel: sd 11:0:0:0: [sdh] Write Protect is off
Jan 20 20:38:55 star34 kernel: sd 11:0:0:0: [sdh] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Jan 20 20:38:55 star34 kernel: sd 11:0:0:0: [sdh] 39023511 4096-byte logical blocks: (156 GB/148 GiB)
Jan 20 20:38:55 star34 kernel: sdh: sdh1
Jan 20 20:38:55 star34 kernel: sd 11:0:0:0: [sdh] 39023511 4096-byte logical blocks: (156 GB/148 GiB)
Jan 20 20:38:55 star34 kernel: sd 11:0:0:0: [sdh] Attached SCSI removable disk
Jan 20 20:38:59 star34 udisksd[22230]: Mounted /dev/sdh1 at /run/media/usilo/IPOD OF AF on behalf of uid 6792
Jan 20 20:38:59 star34 org.gtk.vfs.UDisks2VolumeMonitor: disc.c:350: error opening file BDMV/index.bdmv
Jan 20 20:39:00 star34 org.gtk.vfs.UDisks2VolumeMonitor: disc.c:350: error opening file BDMV/BACKUP/index.bdmv

gtkpod brings a message when trying to copy, probably this may help:


(gtkpod:12782): libanjuta-CRITICAL **: anjuta_status_progress_increment_ticks: assertion 'status->priv->total_ticks != 0' failed

** (gtkpod:12782): CRITICAL **: itdb_splr_validate: assertion 'at != ITDB_SPLAT_UNKNOWN' failed

i'll attach an strace. The message is printed in line 11287, probably resulting
from one of the activities before. From 11425 onward it looks to me like X11 communication creating the error window. So the crucial things should happen before.

HTH
Comment 3 Albert Flügel 2016-01-20 15:06 EST
Created attachment 1116714 [details]
strace of gtkpod during the error
Comment 4 Gwyn Ciesla 2016-01-20 15:14:29 EST
Are you able to add and remove files to the iPod's filesystem manually when mounted?
Comment 5 Albert Flügel 2016-01-20 16:09:26 EST
Yes
Comment 6 Albert Flügel 2016-01-24 07:33:43 EST
Turns out to be bug https://bugzilla.redhat.com/show_bug.cgi?id=772633
The .m4a files are not recognized as audio files. The error handled in libgtkpod/file.c line 1655 reading "File type of %s is not recognised" is displayed nowhere.
How can it be achieved to make .m4a recognized as audio file ?
Comment 7 Albert Flügel 2016-01-25 04:44:37 EST
So i dived into the gtkpod sources and found, that the plugin for m4a is only built, when the faad program / library is available. I really don't understand, what sense this is making. faad is used to convert audio formats. This is not what i want to do and i don't find this functionality in the gtkpod GUI. I just want to handle m4a files with the ipod, what actually means copy them on and off the ipod.

The respective faad calls are done in scripts, that - as far as i found until now - are never called from gtkpod. So why is the m4a plugin disabled ?

On a bare Fedora system there are neither programs available to convert e.g. mp4 or even mp3. Nonetheless the respective gtkpod plugins are built.

So what i did is to hardly enable m4a in the configure script by setting
have_m4a=yes
Then built gtkpod as usual and voila, it copies the tracks correctly to the ipod and this is all i want.

Being able to convert files and being able to copy files are two different things that are mixed up in the gtkpod implementation. So i'd request it's maintainers to keep these things really different and enable the m4a plugin also without faad. As is, i consider it inconsistent and unpleasant. Handling m4a is disabled without real need.

How can i request this upstream ?

In the meantime i'll prepare a patch to change this strange constellation and post it here.
Comment 8 Gwyn Ciesla 2016-01-25 13:49:41 EST
Their bug tracker is here:

http://sourceforge.net/p/gtkpod/bugs/
Comment 9 Albert Flügel 2016-01-26 15:17 EST
Created attachment 1118605 [details]
Patch to enable the m4a "plugin"

Patch file to put into the SOURCES directory of the RPM build infrastructure
Comment 10 Albert Flügel 2016-01-26 15:19 EST
Created attachment 1118607 [details]
Modified SPEC file to build gtkpod with support for m4a files (without conversion)

Put this spec file into the SPECS directory of the RPM infrastructure and build the gtkpod RPM as usual running rpmbuild -bb gtkpod.spec
Comment 11 Albert Flügel 2016-01-26 15:24:40 EST
The proposed patch is very simple, frankly. It hardly enables gtkpod to copy m4a files to the ipod after enabling the plugin in the preferences.

Have to discuss with the authors regarding this disabling of the m4a plugin.
If a functionality is depending on the availability of a program, this should
be checked at runtime (not at install time, not at all at build time) and then the respective options offered - so that it is possible to add the program, if one wants to, without the necessity to rebuild the program.
Comment 12 Sergio Monteiro Basto 2016-01-27 12:59:29 EST
(In reply to Albert Flügel from comment #10)
> Created attachment 1118607 [details]
> Modified SPEC file to build gtkpod with support for m4a files (without
> conversion)
> 
> Put this spec file into the SPECS directory of the RPM infrastructure and
> build the gtkpod RPM as usual running rpmbuild -bb gtkpod.spec

Did you check if it works ? , could you attach the patch (diff -up gtkpod.spec.orig gtkpod.spec ) to us please ? 


Thanks.
Comment 13 Albert Flügel 2016-01-27 14:23:39 EST
Sure i checked, that it works. With m4a build enabled the respective plugin is offered in the preferences dialog tab, can be switched on and i copied several albums containing dozens of tracks successfully to the iPod. And they play perfectly.

After adding to the iPod, in gtkpod one gets a warning dialog, that something went wrong during copy. But this applies to a GUI problem. Somehow it does not manage to popup the window showing the progress bar. But this is a different bug and has nothing to do with the file copy and iTunes database update. These things just work.

I'll attach the diff of the spec file. The SRPM can be downloaded from http://www.muc.de/~af/sw/gtkpod-2.1.5-1.fc23.src.rpm and the modified RPM for installation on a x86_64 system as http://www.muc.de/~af/sw/gtkpod-2.1.5-1.fc23.x86_64.rpm
Comment 14 Albert Flügel 2016-01-27 14:28 EST
Created attachment 1118858 [details]
diff of the original and modified spec file as requested
Comment 15 Sergio Monteiro Basto 2016-01-28 20:29 EST
Created attachment 1119320 [details]
gtkpod.spec.patch
Comment 16 Sergio Monteiro Basto 2016-01-28 20:42 EST
Created attachment 1119321 [details]
gtkpod-m4a.diff

After analysing configure.ac, I verify to build m4a , it needs find faad binary on system , but faad is a package of RPM Fusion , so let build M4A File type without find faad (from faad2 package) , is my propose .
After that we should use autoreconf to regenerate ./configure.

I also add BuildRequires:  libmusicbrainz5-devel, it seemed cool.
Comment 17 Sergio Monteiro Basto 2016-01-28 20:46:33 EST
Albert Flügel ,
Thanks for the patches and feedback. 
Have you faad2 installed on your system ? Without faad installed in your system plugin works ? if yes we should try upstream gtkpod-m4a.diff .
Comment 18 Albert Flügel 2016-01-29 03:20:29 EST
I have neither faad nor faad2 nor any kind of libfaad installed. The plugin works, yes. Probably to clarify a bit more:

There are 2 functionalities:
* Extract metainformation from the files (like title, album, author, performer). This is the purpose of the plugin library, in our case m4a. And this makes sense and is required to register the copied track files in the iTunes database on the ipod.
* handle the audio format (do conversions, probably play). This is done by the faad(2) stuff. In gtkpod it is used, if in the preferences certain on-the-fly conversions are switched on.

With some change years ago the gtkpod maintainers made the first thing dependent on the second one, what prevents users from dealing with m4a files on their ipod. I have no idea, what sense this makes and why they introduced this odd dependency. For me even stranger, if faad is not available, in the code areas for the second thing i don't see, that sth. is disabled / enabled, where i'd consider it reasonable, because this functionality is really needing faad.

This is why i wrote before, that in the audio coding conversion area there might be a dependency introduced, but not at build time, but at runtime. Could be a user decides after installing gtkpod to add faad later to his system - the questionable that is, but this is a different discussion. Then gtkpod could detect faad easily and offer the conversion options.

Still, i did not find the time to discuss upstream. Hope i can do this next week.
Comment 19 Sergio Monteiro Basto 2016-01-29 11:00:40 EST
(In reply to Albert Flügel from comment #18)
> I have neither faad nor faad2 nor any kind of libfaad installed. The plugin
> works, yes. 

OK Jon Ciesla please apply gtkpod.spec.patch and gtkpod-m4a.diff  in this package .

Thanks.
Comment 20 Sergio Monteiro Basto 2016-01-29 11:08:04 EST
https://sourceforge.net/p/gtkpod/patches/46/
Comment 21 Fedora Update System 2016-01-29 12:47:21 EST
gtkpod-2.1.5-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d3e584f6e0
Comment 22 Fedora Update System 2016-01-30 14:55:27 EST
gtkpod-2.1.5-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d3e584f6e0
Comment 23 Fedora Update System 2016-02-07 22:23:21 EST
gtkpod-2.1.5-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.