GNOME Bugzilla – Bug 634652
NRE when syncing iPod with new AppleDevice extension when the track is not seen by the iPod
Last modified: 2010-12-22 21:52:55 UTC
Just installed Ubuntu 10.10 in my new netbook, compiled Banshee from git master and got this: [4 Debug 23:58:26.419] Found DAP support (Banshee.Dap.AppleDevice.AppleDeviceSource) for device iPod Video and Uuid /org/freedesktop/Hal/devices/volume_uuid_30E9_5C54 [5 Warn 23:58:26.536] Caught an exception - System.NullReferenceException: Object reference not set to an instance of an object (in `Banshee.Dap.AppleDevice') at Banshee.Dap.AppleDevice.AppleDeviceTrackInfo.LoadFromIpodTrack () [0x00007] in /home/knocte/banshee/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs:120 [5 Warn 23:58:26.736] Caught an exception - System.NullReferenceException: Object reference not set to an instance of an object (in `Banshee.Dap.AppleDevice') at Banshee.Dap.AppleDevice.AppleDeviceTrackInfo.LoadFromIpodTrack () [0x00007] in /home/knocte/banshee/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs:120 By further investigation, this happens because String.IsNullOrEmpty(track.IpodPath)==true, but I don't know why. And I don't know yet why this seems to be causing the ipod not to sync at all. CCing Alan.
Conversation with Alan reveals the tracks are actually not seen by the iPod itself, so in this case we should try to remove the tracks.
Created attachment 176513 [details] [review] This fixes my problem This bug should have more severity than what it currently has because it prevented me from syncing the iPod completely (even if the NRE was logged and apparently ignored, libgpod wouldn't really sync my tracks; after this patch, it seems the DB of the ipod gets "fixed" because the sync occurs, and thus fixes the whole sync process altogether).
Created attachment 176667 [details] [review] Same patch, using git format-patch, so it includes an explanation in the commit
LGTM! I'd love to know how/why this is happening though. If we could fix the cause instead of treating the symptoms that'd be great.
(In reply to comment #4) > LGTM! > > I'd love to know how/why this is happening though. If we could fix the cause > instead of treating the symptoms that'd be great. Alan, take in account this was happening to me right when I started using AppleDevice and I stopped using the ipod-sharp-based addin, so the root cause may be actually an ipod-sharp bug. After my invalid tracks were removed from the iPod I've never seen this problem again when syncing my device with the AppleDevice addin.
Comment on attachment 176667 [details] [review] Same patch, using git format-patch, so it includes an explanation in the commit BTW, next time please use the accepted-commit_now flag :) Thanks for the review! Committed in 8b67b7744e0126e6adeacaa7e2caa28572feb60e