After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634652 - NRE when syncing iPod with new AppleDevice extension when the track is not seen by the iPod
NRE when syncing iPod with new AppleDevice extension when the track is not se...
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Device - iPod
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Andrés G. Aragoneses (IRC: knocte)
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-12 01:53 UTC by Andrés G. Aragoneses (IRC: knocte)
Modified: 2010-12-22 21:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This fixes my problem (3.39 KB, patch)
2010-12-16 02:10 UTC, Andrés G. Aragoneses (IRC: knocte)
none Details | Review
Same patch, using git format-patch, so it includes an explanation in the commit (4.19 KB, patch)
2010-12-18 17:41 UTC, Andrés G. Aragoneses (IRC: knocte)
committed Details | Review

Description Andrés G. Aragoneses (IRC: knocte) 2010-11-12 01:53:48 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.
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2010-11-12 13:37:36 UTC
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.
Comment 2 Andrés G. Aragoneses (IRC: knocte) 2010-12-16 02:10:48 UTC
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).
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2010-12-18 17:41:22 UTC
Created attachment 176667 [details] [review]
Same patch, using git format-patch, so it includes an explanation in the commit
Comment 4 Alan McGovern 2010-12-22 21:24:26 UTC
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.
Comment 5 Andrés G. Aragoneses (IRC: knocte) 2010-12-22 21:51:39 UTC
(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 6 Andrés G. Aragoneses (IRC: knocte) 2010-12-22 21:52:55 UTC
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