GNOME Bugzilla – Bug 679260
Banshee cannot load Ipod (NullReferenceException trying to delete invalid tracks which are podcasts)
Last modified: 2012-09-23 15:46:09 UTC
Created attachment 217838 [details] created with kill -s QUIT $(pidof banshee); cp ~/.config/banshee-1/log ~/Desktop/banshee.log Before it worked fine but since I accidentaly shut down my laptop while syncronizing banshee with my ipod banshee will recognize that an Ipod is plugged in but keeps saying "Loading Ipod" and nothing else happens. This is the ouput of "banshee --debug": banshee --debug ** Running Mono with --debug ** [1 Debug 16:34:56.017] Bus.Session.RequestName ('org.bansheeproject.Banshee') replied with PrimaryOwner [1 Info 16:34:56.035] Running Banshee 2.4.0: [Ubuntu 12.04 LTS (linux-gnu, x86_64) @ 2012-05-06 11:52:27 UTC] [1 Debug 16:34:56.044] Initializing GTK [1 Debug 16:34:57.105] Post-Initializing GTK [1 Debug 16:34:57.119] Configuration client extension loaded (Banshee.GnomeBackend.GConfConfigurationClient) [1 Debug 16:34:57.122] Using default gconf-base-key [1 Debug 16:34:57.213] Core service started (DBusServiceManager, 0.001677) [1 Debug 16:34:57.216] Registering remote object /org/bansheeproject/Banshee/DBusCommandService (Banshee.ServiceStack.DBusCommandService) on org.bansheeproject.Banshee [1 Debug 16:34:57.224] Core service started (DBusCommandService, 0.010397) [1 Debug 16:34:57.258] Opened SQLite (version 3.7.9) connection to /home/simon/.config/banshee-1/banshee.db [1 Debug 16:34:57.260] Core service started (DbConnection, 0.035821) [1 Debug 16:34:57.271] Database version 45 is up to date [1 Debug 16:34:57.280] Running ANALYZE against database to improve performance [1 Debug 16:34:57.331] Core service started (PreferenceService, 0.018401) [1 Debug 16:34:57.343] Core service started (Network, 0.011269) [1 Debug 16:34:57.344] Registering remote object /org/bansheeproject/Banshee/SourceManager (Banshee.Sources.SourceManager) on org.bansheeproject.Banshee [1 Debug 16:34:57.344] Core service started (SourceManager, 0.000871) [1 Debug 16:34:57.349] Core service started (MediaProfileManager, 0.000312) [1 Debug 16:34:57.353] Registering remote object /org/bansheeproject/Banshee/PlayerEngine (Banshee.MediaEngine.PlayerEngineService) on org.bansheeproject.Banshee [1 Debug 16:34:57.355] Core service started (PlayerEngine, 0.005598) [1 Debug 16:34:57.372] Registering remote object /org/bansheeproject/Banshee/PlaybackController (Banshee.PlaybackController.PlaybackControllerService) on org.bansheeproject.Banshee [1 Debug 16:34:57.373] Core service started (PlaybackController, 0.003213) [1 Debug 16:34:57.379] Starting - Startup Job [1 Debug 16:34:57.380] Core service started (JobScheduler, 0.007025) [1 Debug 16:34:57.393] IO provider extension loaded (Banshee.IO.Gio.Provider) [1 Debug 16:34:57.440] Loaded HardwareManager backend: Banshee.Hardware.Gio [1 Debug 16:34:57.442] Core service started (HardwareManager, 0.061359) [1 Debug 16:34:57.443] Bus.Session.RequestName ('org.bansheeproject.CollectionIndexer') replied with PrimaryOwner [1 Debug 16:34:57.445] Registering remote object /org/bansheeproject/Banshee/CollectionIndexerService (Banshee.Collection.Indexer.CollectionIndexerService) on org.bansheeproject.CollectionIndexer [1 Debug 16:34:57.446] Core service started (CollectionIndexerService, 0.004594) [1 Debug 16:34:57.448] Core service started (SaveTrackMetadataService, 0.00153) [1 Debug 16:34:57.472] Adding icon theme search path: /usr/share/banshee/icons [1 Debug 16:34:57.473] Core service started (GtkElementsService, 0.024786) [1 Debug 16:34:57.475] Core service started (InterfaceActionService, 0.001547) [1 Debug 16:34:57.596] Extension actions loaded: MetadataFixActions [1 Debug 16:34:57.597] Registering remote object /org/bansheeproject/Banshee/GlobalUIActions (Banshee.Gui.GlobalActions) on org.bansheeproject.Banshee [1 Debug 16:34:57.600] Album artwork path set to /home/simon/.cache/media-art [1 Debug 16:34:57.620] Core service started (ArtworkManager, 0.022898) [1 Debug 16:34:57.620] Core service started (BookmarksService, 0.00019) [1 Debug 16:34:57.834] Adding context page wikipedia [1 Debug 16:34:57.843] Adding context page lastfm-recommendations [1 Debug 16:34:58.083] Constructed Nereid interface: 0.426504 [1 Debug 16:34:58.173] Creating new surface cache for 90px images, capped at 0.19 MiB (6 items) [1 Debug 16:34:58.276] Registering remote object /org/bansheeproject/Banshee/ClientWindow (Nereid.PlayerInterface) on org.bansheeproject.Banshee [1 Debug 16:34:58.276] Core service started (NereidPlayerInterface, 0.644428) [1 Debug 16:34:58.280] Extension service started (AmazonMp3DownloaderService, 0.003107) [1 Debug 16:34:58.315] Extension service started (NotificationAreaService, 0.034601) [1 Debug 16:34:58.318] Extension service started (CoverArtService, 0.002473) [1 Debug 16:34:58.319] Extension service started (DapService, 0.001112) [1 Debug 16:34:58.325] Extension service started (BpmService, 0.006321) [1 Warn 16:34:58.334] Caught an exception - System.ApplicationException: No support GNOME Settings Daemon could be reached. (in `Banshee.MultimediaKeys') at Banshee.MultimediaKeys.MultimediaKeysService.Banshee.ServiceStack.IExtensionService.Initialize () [0x00000] in <filename unknown>:0 at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00000] in <filename unknown>:0 [1 Warn 16:34:58.335] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached. [1 Info 16:34:58.338] Updating web proxy from GConf [1 Debug 16:34:58.346] Direct connection, no proxy in use [1 Debug 16:34:58.363] Extension service started (GnomeService, 0.028781) [1 Debug 16:34:58.365] Extension service started (DaapService, 0.001076) [1 Debug 16:34:58.394] Extension service started (AudioCdService, 0.028973) [1 Debug 16:34:58.396] Extension service started (DvdService, 0.002254) [1 Debug 16:34:58.421] Extension service started (GStreamerCoreService, 0.02492) [1 Debug 16:34:58.448] Extension service started (EmusicService, 0.027032) [1 Debug 16:34:58.464] Audioscrobbler state: connected [1 Debug 16:34:58.466] Extension service started (AudioscrobblerService, 0.017399) [1 Debug 16:34:58.474] Extension service started (MprisService, 0.007887) [1 Debug 16:34:58.476] Extension service started (PodcastService, 0.002009) [1 Debug 16:34:58.482] Extension service started (LastfmFingerprintService, 0.00612) [1 Warn 16:34:58.485] Caught an exception - System.ApplicationException: No support GNOME Settings Daemon could be reached. (in `Banshee.MultimediaKeys') at Banshee.MultimediaKeys.MultimediaKeysService.Banshee.ServiceStack.IExtensionService.Initialize () [0x00000] in <filename unknown>:0 at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00000] in <filename unknown>:0 [1 Warn 16:34:58.485] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached. [1 Info 16:34:58.485] All services are started 1.334135 [1 Debug 16:34:59.068] Creating Pango.Layout, configuring Cairo.Context [1 Debug 16:34:59.316] Extension source loaded: Internet Archive [1 Info 16:34:59.326] AmazonMP3 store redirect URL: http://redir.linuxmint.com/mp3amazonstore/ [1 Debug 16:34:59.327] Extension source loaded: Amazon MP3 Store [1 Debug 16:34:59.365] Extension source loaded: Audiobooks [1 Debug 16:34:59.441] Extension source loaded: File System Queue [1 Debug 16:34:59.446] Extension source loaded: Now Playing [1 Debug 16:34:59.697] Registering remote object /org/bansheeproject/Banshee/SourceManager/PlayQueue (Banshee.PlayQueue.PlayQueueSource) on org.bansheeproject.Banshee [1 Debug 16:34:59.698] Extension source loaded: Play Queue [1 Debug 16:34:59.706] Extension source loaded: Miro Guide [1 Debug 16:34:59.732] Extension source loaded: Radio [1 Debug 16:34:59.756] Extension source loaded: Last.fm [1 Debug 16:34:59.762] Starting GTK main loop [1 Debug 16:34:59.997] Creating Pango.Layout, configuring Cairo.Context [1 Debug 16:35:00.030] Creating Pango.Layout, configuring Cairo.Context [1 Info 16:35:00.175] nereid Client Started [1 Debug 16:35:00.178] Delayed Initializating Banshee.MediaEngine.PlayerEngineService [1 Debug 16:35:00.194] (libbanshee:player) Audiosink has volume: YES [1 Debug 16:35:00.204] (libbanshee:player) Using system (gst-plugins-good) equalizer element [1 Debug 16:35:00.269] Player state change: NotReady -> Ready [1 Debug 16:35:00.276] Loaded equalizer presets: 0.002709 [1 Debug 16:35:00.281] Selected equalizer: Classical [1 Debug 16:35:00.286] Player state change: Ready -> Idle [1 Debug 16:35:00.290] (libbanshee:player) Disabled ReplayGain [1 Info 16:35:00.291] GStreamer version 0.10.36.0, gapless: True, replaygain: False [1 Debug 16:35:00.293] Delayed Initializating Banshee.Dap.DapService [1 Debug 16:35:00.302] Dap support extension loaded: Banshee.Dap.MassStorage [1 Debug 16:35:00.303] Dap support extension loaded: Banshee.Dap.AppleDevice [1 Debug 16:35:00.304] Dap support extension loaded: Banshee.Dap.Mtp [1 Debug 16:35:00.312] Delayed Initializating Banshee.Daap.DaapService [1 Debug 16:35:00.313] Delayed Initializating Banshee.Podcasting.PodcastService [7 Info 16:35:00.341] AppleDeviceSource is ignoring unmounted volume SYSTEM [7 Info 16:35:00.379] AppleDeviceSource is ignoring unmounted volume 31 GB Filesystem [9 Debug 16:35:00.387] Refreshing any podcasts that haven't been updated in over an hour [7 Debug 16:35:00.776] Found DAP support (Banshee.Dap.AppleDevice.AppleDeviceSource) for device Simons iPod and Uuid /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/host7/target7:0:0/7:0:0:0/block/sdc/sdc1 [7 Info 16:35:00.777] AppleDeviceSource is ignoring unmounted volume HP_TOOLS [1 Debug 16:35:01.380] Finished - Startup Job [1 Debug 16:35:01.387] Starting - Downloading Cover Art [12 Debug 16:35:01.391] Finished - Downloading Cover Art [15 Debug 16:35:02.070] DAAP Proxy listening for connections on port 8089 [16 Warn 16:35:07.056] Found 283 invalid tracks on the device [1 Debug 16:35:08.264] Starting - Saving Metadata to File [17 Debug 16:35:08.282] Finished - Saving Metadata to File [16 Warn 16:35:09.504] Caught an exception - System.NullReferenceException: Object reference not set to an instance of an object (in `Banshee.Dap.AppleDevice') at Banshee.Dap.AppleDevice.AppleDeviceSource.DeleteTrack (GPod.Track track, Boolean removeFile) [0x00000] in <filename unknown>:0 at Banshee.Dap.AppleDevice.AppleDeviceSource.LoadFromDevice (Boolean refresh) [0x00000] in <filename unknown>:0 at Banshee.Dap.AppleDevice.AppleDeviceSource.LoadFromDevice () [0x00000] in <filename unknown>:0 at Banshee.Dap.DapSource.ThreadedLoadDeviceContents (System.Object state) [0x00000] in <filename unknown>:0 I attach a log file created with "kill -s QUIT $(pidof banshee); cp ~/.config/banshee-1/log ~/Desktop/banshee.log" Thanks, Simon
Created attachment 217857 [details] [review] Debug patch Simon, do you know how to compile Banshee?? If yes, could you test doing it but applying this patch? Then attach a new log please. (If you don't know how to compile Banshee, tell me and I will attach a DLL instead)
I don't know how to do it unfortunately..
Created attachment 217858 [details] The DLL for testing Ok, here is the DLL, you have to locate the one with the same name and overwrite it with this one.
Created attachment 217862 [details] .log file after replacing "Banshee.Dap.AppleDevice.dll"
Created attachment 217863 [details] DLL for testing, v2 Thanks Simon! Can you now test this DLL? I think it should fix the bug. PS: Please make sure you have backup of the data that you have in the iPod, just in case.
Created attachment 217868 [details] new log after dll file v2
I tried the new dll file, it still doesnt work though.. I attached the new log Thank you alot for your support!
Created attachment 217870 [details] DLL for testing, v3 (In reply to comment #7) > I tried the new dll file, it still doesnt work though.. I attached the new log That is weird, the log is completely the same! Are you sure you used the new DLL? I'm re-attaching, just in case the mistake was on my side! > Thank you alot for your support! No problem, thanks for helping me fix this.
I tried it again and im sure that i replaced the file now. I think there is a difference in the output when I run banshee --debug though, now there is a long list of ___playlist is null: False ___playlist.Tracks is null: False ___playlist is null: False ___playlist.Tracks is null: False ___playlist is null: False ___playlist.Tracks is null: False and then ___MediaDatabase.MasterPlaylist is null: False ___MediaDatabase.MasterPlaylist.Tracks is null: False ___MediaDatabase.Tracks is null: False ___MediaDatabase is null: False ___MediaDatabase.Playlists is null: False and this goes on and on. After the first dll you posted there wasnt this kind of never ending output from "banshee --debug" if i remember correctly. I hope this information helps you. Thanks, Simon
(In reply to comment #9) > I tried it again and im sure that i replaced the file now. I think there is a > difference in the output when I run banshee --debug though Yes, there is a difference from the 1st log to the 2nd you posted (the 2nd includes the traces I added), but I'm saying that there is no difference between the 2nd and 3rd that you posted! Can you capture and post a new one with the last DLL I posted?
Ok I do get a different log now, youre right. Here it is
Created attachment 217916 [details] New log file v3
Thanks Simon. The last log shows no error, so I guess it worked this time? What did you see inside the iPod source?
It still didnt work.. The Ipod still doesnt load. But it seems that I get a different log file depending on if I run banshee normally or like this: "banshee --debug". Im attaching the new logfile. thanks, Simon
Created attachment 217932 [details] New log file v4
Created attachment 218216 [details] DLL for testing, v4 Simon, thanks for that last log. It seems you didn't give enough time for Banshee to delete invalid tracks in your iPod. Anyway, to figure out if I'm right or not, I'm attaching a new DLL that uses proper Hyena.Log statements so we can see the time each operation takes. Sorry for not posting it earlier! Been very busy this week. Hopefully we can squash this bug soon.
Hello, so i used this new dll and created a log. It seems that the log file gets bigger if I create it later during the same session. I do think that some of the files on the Ipod may be corrupt, maybe I can reset the database on the Ipod and try banshee then? Do you know how to do that? Thanks! Simon
Created attachment 218265 [details] New log file v5
(In reply to comment #17) > so i used this new dll and created a log. It seems that the log file gets > bigger if I create it later during the same session Yes, well, how are you creating the log actually? Are you just launching banshee and executing the "kill" command? Please don't do that, just start banshee, connect the iPod and wait a bit until Banshee tries to remove the invalid/corrupted tracks. Can you do this and post a new log? > I do think that some of > the files on the Ipod may be corrupt, maybe I can reset the database on the > Ipod and try banshee then? Do you know how to do that? What I'm trying to fix is the process that Banshee has to fix the corruption of the files, so please don't try to fix it yourself manually! If you do, then we won't be able to fix Banshee for the next user.
By the way, the kill -s QUIT command should only be used when you think Banshee has hang/frozen and you want to get a log of that situation. We don't know yet if in this case Banshee freezes, maybe it's just taking a long time to delete the invalid tracks... and you are not waiting enough? Can you see the log while it is being executed or are you extracting the log from ~/.config/banshee-1/log ? If it is the latter, you can launch another terminal while banshee is running, and run the command "tail -f ~/.config/banshee-1/log" to see in real time what is being outputted in the log.
I created the log using following command: kill -s QUIT $(pidof banshee); cp ~/.config/banshee-1/log ~/Desktop/banshee.log I found it in the guidelines for filing a bug, I didnt realise it was only meant for crashes. I did what you said and waited longer, I let my laptop stand with my Ipod connected and 45 minutes later when I returned, the Ipod was succesfully loaded! I can see all the Music on it and I can sync it with my library, I'm really happy that it works now. Does it automatically remove the corrupt files from the Ipod? I'm sorry that I didn't wait longer in the first place, I just didnt realise that that might be the problem.. Thank you for helping me out and trying to fix the issue. Maybe a useful addon to banshee would be a notification, that one can see how many corrupted files there are on the device and that one can follow the process of removing them? Simon
(In reply to comment #21) > I created the log using following command: > > kill -s QUIT $(pidof banshee); cp ~/.config/banshee-1/log ~/Desktop/banshee.log > > I found it in the guidelines for filing a bug, I didnt realise it was only > meant for crashes. I didn't say crashes, I said hangs/freezes. > I did what you said and waited longer, I let my laptop stand > with my Ipod connected and 45 minutes later when I returned, the Ipod was > succesfully loaded! Cool, can you attach the log of that session please??? > I can see all the Music on it and I can sync it with my library, I'm really > happy that it works now. Does it automatically remove the corrupt files from > the Ipod? Cool, I'm going to commit the fix to Banshee that is already on the DLL you used. > Maybe a useful addon to banshee would be a notification, that one can see how > many corrupted files there are on the device and that one can follow the > process of removing them? Yes, this is definitely something to improve, but without the log of your last session it's difficult to figure things out, I need to know exactly how long it took to delete those tracks (I hope it is much less than 45 minutes), so please attach the last log! Thanks Simon
Alright, now I just copied what was in ~/.config/banshee-1/log to ~/Desktop/banshee.log and uploaded that file. When I saw that the Ipod had loaded I syncronized my podcasts and Music library so this might show up in the log aswell. Thanks! Simon
Created attachment 218296 [details] New log v6
Whenever I connect the Ipod it still takes a long time for banshee to load it though, it seems that the problems in the database haven't been fixed..
(In reply to comment #25) > Whenever I connect the Ipod it still takes a long time for banshee to load it > though, it seems that the problems in the database haven't been fixed.. Ok, Simon, do you mind opening a new bug for that? I'll then attach a new DLL in the new bug so you can test my proposed fix. I'll close this as FIXED as we at least fixed the problem that it couldn't load your iPod in the first places. Fixes were: http://git.gnome.org/browse/banshee/commit/?id=39a45dd963d717c83605abe24e93a055f8c53769 And: http://git.gnome.org/browse/banshee/commit/?h=stable-2.4&id=44fe5ef5401de733848e13bc7705d09ab290b8bf
(In reply to comment #25) > Whenever I connect the Ipod it still takes a long time for banshee to load it > though, it seems that the problems in the database haven't been fixed.. Simon, just to let you know that I committed a fix for this additional problem about iPod taking very long to be loaded, in here: http://git.gnome.org/browse/banshee/commit/?id=f1fb1ca05cccf5d6d6c59c3a47197b33c7d6b2d9 You should compile master branch (or wait to 2.6.0 in a few days) to test this. If you find any further problems, please report a new bug.
*** Bug 642830 has been marked as a duplicate of this bug. ***