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 628832 - Banshee can't show files on MTP device
Banshee can't show files on MTP device
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Device - MTP
1.7.5
Other Linux
: Normal major
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
: 609110 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-09-05 18:02 UTC by Coudy
Modified: 2010-09-08 17:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log (12.76 KB, patch)
2010-09-06 18:29 UTC, Coudy
none Details | Review
Patch to fix the issue (7.47 KB, patch)
2010-09-06 21:20 UTC, Alan McGovern
accepted-commit_now Details | Review
doubled playlists on banshee (10.91 KB, text/plain)
2010-09-07 05:50 UTC, Coudy
  Details

Description Coudy 2010-09-05 18:02:11 UTC
Hi, 
you have repaired my last bug http://bugzilla.gnome.org/show_bug.cgi?id=628388 , but now I can't see any files on my MTP device. Here is report:


[Info  18:28:42.413] Running Banshee 1.7.5: [source-tarball (linux-gnu, x86_64) @ 2010-09-03 19:43:03 CEST]
[Info  18:28:49.858] Updating web proxy from GConf
[Info  18:28:50.020] All services are started 6,729127
[Info  18:28:54.021] nereid Client Started
bpm_detect got error: Zdroj sa nenašiel. gstfilesrc.c(1055): gst_file_src_start (): /GstPipeline:pipeline/GstFileSrc:filesrc:
No such file "/home/coudy/977 The Hitz Channel - 977MUSIC.COM - The #1 Hit Music Internet/Black Eyed Peas - Let's Get It Started.mp3"
bpm_detect got error: Zdroj sa nenašiel. gstfilesrc.c(1055): gst_file_src_start (): /GstPipeline:pipeline/GstFileSrc:filesrc:
No such file "/home/coudy/977 The Hitz Channel - 977MUSIC.COM - The #1 Hit Music Internet/Black Eyed Peas - Let's Get It Started.mp3"
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
PTP_ERROR_IO: Trying again after re-initializing USB interface
LIBMTP PANIC: Unable to read device information on device 4 on bus 1, trying to continue[Warn  18:29:23.972] Caught an exception - System.InvalidCastException: Cannot cast from source type to destination type. (in `Mtp')
  at Mtp.AbstractTrackList..ctor (Mtp.MtpDevice device, IntPtr tracks, UInt32 count) [0x00000] 
  at Mtp.Album..ctor (Mtp.MtpDevice device, AlbumStruct album) [0x00000] 
  at Mtp.Album.GetAlbums (Mtp.MtpDevice device) [0x00000] 
  at Mtp.MtpDevice.GetAlbums () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.LoadFromDevice () [0x00000] 
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
ERROR: Could not close session!
inep: usb_get_endpoint_status(): No such device
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
[Warn  18:31:08.904] Caught an exception - System.InvalidCastException: Cannot cast from source type to destination type. (in `Mtp')
  at Mtp.AbstractTrackList..ctor (Mtp.MtpDevice device, IntPtr tracks, UInt32 count) [0x00000] 
  at Mtp.Album..ctor (Mtp.MtpDevice device, AlbumStruct album) [0x00000] 
  at Mtp.Album.GetAlbums (Mtp.MtpDevice device) [0x00000] 
  at Mtp.MtpDevice.GetAlbums () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.LoadFromDevice () [0x00000] 

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.SmartPlaylist.SmartPlaylistSource.Update () [0x00000] 
  at Banshee.Playlist.AbstractPlaylistSource.Save () [0x00000] 
  at Banshee.Sources.DatabaseSource.RateLimitedReload () [0x00000] 
  at Banshee.Base.RateLimiter.InnerExecute () [0x00000] 
  at Banshee.Base.RateLimiter.Execute () [0x00000] 
  at Banshee.Sources.DatabaseSource.Reload () [0x00000] 
  at Banshee.SmartPlaylist.SmartPlaylistSource.Reload () [0x00000] 
  at Banshee.SmartPlaylist.SmartPlaylistSource.RefreshAndReload () [0x00000] 
  at Banshee.SmartPlaylist.SmartPlaylistSource.HandleTracksChanged (Banshee.Sources.Source sender, Banshee.Sources.TrackEventArgs args) [0x00000] 
  at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler:invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs)
  at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler:invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs)
  at (wrapper delegate-invoke) Banshee.Sources.PrimarySource/TrackEventHandler:invoke_void__this___Source_TrackEventArgs (Banshee.Sources.Source,Banshee.Sources.TrackEventArgs)
  at Banshee.Sources.PrimarySource+<OnTracksChanged>c__AnonStorey19.<>m__13 () [0x00000] 
  at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart threadedMethod) [0x00000] 
  at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[] fields) [0x00000] 
  at Banshee.Sources.DatabaseSource.OnTracksChanged () [0x00000] 
  at Banshee.Sources.PrimarySource.NotifyTracksChanged () [0x00000] 
  at Banshee.LibraryWatcher.SourceWatcher.Watch () [0x00000] 
coudy@coudy:~$ banshee-1 
[Info  19:54:30.419] Running Banshee 1.7.5: [source-tarball (linux-gnu, x86_64) @ 2010-09-03 19:43:03 CEST]
[Info  19:54:32.029] Updating web proxy from GConf
[Info  19:54:32.213] All services are started 1,615948
[Info  19:54:33.432] nereid Client Started
bpm_detect got error: Zdroj sa nenašiel. gstfilesrc.c(1055): gst_file_src_start (): /GstPipeline:pipeline/GstFileSrc:filesrc:
No such file "/home/coudy/977 The Hitz Channel - 977MUSIC.COM - The #1 Hit Music Internet/Black Eyed Peas - Let's Get It Started.mp3"
bpm_detect got error: Zdroj sa nenašiel. gstfilesrc.c(1055): gst_file_src_start (): /GstPipeline:pipeline/GstFileSrc:filesrc:
No such file "/home/coudy/977 The Hitz Channel - 977MUSIC.COM - The #1 Hit Music Internet/Black Eyed Peas - Let's Get It Started.mp3"
Device 0 (VID=04e8 and PID=507d) is a Samsung YP-U3.
[Warn  19:55:13.902] Caught an exception - System.InvalidCastException: Cannot cast from source type to destination type. (in `Mtp')
  at Mtp.AbstractTrackList..ctor (Mtp.MtpDevice device, IntPtr tracks, UInt32 count) [0x00000] 
  at Mtp.Album..ctor (Mtp.MtpDevice device, AlbumStruct album) [0x00000] 
  at Mtp.Album.GetAlbums (Mtp.MtpDevice device) [0x00000] 
  at Mtp.MtpDevice.GetAlbums () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.LoadFromDevice () [0x00000] 

Full thread dump:

"<threadpool thread>" tid=0x0x7f8aca3eb710 this=0x0x7f8aca4d3758 thread handle 0x8c0 state : interrupted state owns ()

"LibraryWatcher for Videa" tid=0x0x7f8ad184b710 this=0x0x7f8ad2f68178 thread handle 0x456 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x0004e>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0xffffffff>
  at System.Threading.WaitHandle.WaitOne () <0x0006b>
  at Banshee.LibraryWatcher.SourceWatcher.Watch () <0x0023f>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

"<unnamed thread>" tid=0x0x7f8ad15fe710 this=0x0x7f8ad9d5acc0 thread handle 0x45f state : interrupted state owns ()
  at (wrapper managed-to-native) System.IO.InotifyWatcher.ReadFromFD (intptr,byte[],intptr) <0x00075>
  at (wrapper managed-to-native) System.IO.InotifyWatcher.ReadFromFD (intptr,byte[],intptr) <0xffffffff>
  at System.IO.InotifyWatcher.Monitor () <0x0005f>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

"Main Thread" tid=0x0x7f8ae786c740 this=0x0x7f8ae76fde58 thread handle 0x404 state : not waiting owns ()
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00052>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
  at Gtk.Application.Run () <0x0000b>
  at Banshee.Gui.GtkBaseClient.Run () <0x00067>
  at Banshee.Gui.GtkBaseClient.Startup () <0x00050>
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.CleanRoomStartup/StartupInvocationHandler) <0x0008e>
  at Banshee.Gui.GtkBaseClient.Startup<Nereid.Client> () <0x0006b>
  at Banshee.Gui.GtkBaseClient.Startup<Nereid.Client> (string[]) <0x000e7>
  at Nereid.Client.Main (string[]) <0x0001b>
  at (wrapper runtime-invoke) Nereid.Client.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly (System.Reflection.Assembly,string[]) <0x0004b>
  at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly (System.Reflection.Assembly,string[]) <0xffffffff>
  at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly,string[]) <0x00037>
  at System.AppDomain.ExecuteAssembly (string,System.Security.Policy.Evidence,string[]) <0x00037>
  at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly (string,System.Security.Policy.Evidence,string[]) <0xffffffff>
  at System.AppDomain.ExecuteAssembly (string) <0x0001f>
  at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly (string) <0xffffffff>
  at Booter.Booter.BootClient (string) <0x0006b>
  at Booter.Booter.Main () <0x001b7>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

"<threadpool thread>" tid=0x0x7f8ad0dfa710 this=0x0x7f8ad93c2bc0 thread handle 0x4d4 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAny_internal (System.Threading.WaitHandle[],int,bool) <0x0004b>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAny_internal (System.Threading.WaitHandle[],int,bool) <0xffffffff>
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[],System.TimeSpan,bool) <0x00077>
  at System.Threading.RegisteredWaitHandle.Wait (object) <0x000bb>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

"HyenaSqliteConnection (/home/coudy/.config/banshee-1/banshee.db)" tid=0x0x7f8ad9381710 this=0x0x7f8ae76fdb28 thread handle 0x41b state : interrupted state owns ()
  at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_step (intptr) <0x00056>
  at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_step (intptr) <0xffffffff>
  at Mono.Data.Sqlite.Sqlite3.Step (Mono.Data.Sqlite.SqliteStatement) <0x0003b>
  at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () <0x000b7>
  at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () <0xffffffff>
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection,Mono.Data.Sqlite.SqliteConnection) <0x0023f>
  at Hyena.Data.Sqlite.HyenaSqliteConnection.ProcessQueue () <0x0017f>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

"<threadpool thread>" tid=0x0x7f8ad11fc710 this=0x0x7f8ad3ad57f8 thread handle 0x471 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAny_internal (System.Threading.WaitHandle[],int,bool) <0x0004b>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAny_internal (System.Threading.WaitHandle[],int,bool) <0xffffffff>
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[],System.TimeSpan,bool) <0x00077>
  at System.Threading.RegisteredWaitHandle.Wait (object) <0x000bb>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

"<threadpool thread>" tid=0x0x7f8ad0bf9710 this=0x0x7f8ad3ad5660 thread handle 0x57a state : interrupted state owns ()
  at (wrapper managed-to-native) Mono.Unix.Native.Syscall.read (int,intptr,ulong) <0x00062>
  at (wrapper managed-to-native) Mono.Unix.Native.Syscall.read (int,intptr,ulong) <0xffffffff>
  at Mono.Unix.Native.Syscall.read (int,void*,ulong) <0x00033>
  at Mono.Unix.UnixStream.Read (byte[],int,int) <0x00093>
  at NDesk.DBus.Connection.ReadMessage () <0x00061>
  at NDesk.DBus.Connection.Iterate () <0x0001f>
  at Mono.Zeroconf.Providers.AvahiDBus.DBusManager.IterateThread (object) <0x0007f>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

"DAAP Proxy" tid=0x0x7f8acbfff710 this=0x0x7f8ad3ad5330 thread handle 0x591 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Net.Sockets.Socket.Accept_internal (intptr,int&,bool) <0x0004e>
  at (wrapper managed-to-native) System.Net.Sockets.Socket.Accept_internal (intptr,int&,bool) <0xffffffff>
  at System.Net.Sockets.Socket.Accept () <0x000a3>
  at Banshee.Web.BaseHttpServer.ServerLoop () <0x0014b>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

"<threadpool thread>" tid=0x0x7f8ad0ffb710 this=0x0x7f8ad93c2d38 thread handle 0x486 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAny_internal (System.Threading.WaitHandle[],int,bool) <0x0004b>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAny_internal (System.Threading.WaitHandle[],int,bool) <0xffffffff>
  at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[],System.TimeSpan,bool) <0x00077>
  at System.Threading.RegisteredWaitHandle.Wait (object) <0x000bb>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

"<threadpool thread>" tid=0x0x7f8acabb0710 this=0x0x7f8aca4d35e0 thread handle 0x8c3 state : interrupted state owns ()

"Hyena.Jobs.JobRunner (Rozpoznat tempo)" tid=0x0x7f8ad13fd710 this=0x0x7f8ad93c2a48 thread handle 0x605 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x0004e>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0xffffffff>
  at System.Threading.WaitHandle.WaitOne () <0x0006b>
  at Banshee.Bpm.BpmDetectJob.IterateCore (Hyena.Data.Sqlite.HyenaDataReader) <0x000c1>
  at Banshee.ServiceStack.DbIteratorJob.Iterate () <0x0011e>
  at Banshee.ServiceStack.DbIteratorJob.Run () <0x0004b>
  at Hyena.Jobs.SimpleAsyncJob.InnerStart () <0x0001d>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

"Hyena.Jobs.JobRunner (Ukládají se metadata do souboru)" tid=0x0x7f8ad0992710 this=0x0x7f8ad93c2758 thread handle 0x6d7 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.Thread.Sleep_internal (int) <0x00045>
  at (wrapper managed-to-native) System.Threading.Thread.Sleep_internal (int) <0xffffffff>
  at System.Threading.Thread.Sleep (System.TimeSpan) <0x0003f>
  at Banshee.Metadata.SaveTrackMetadataJob.IterateCore (Hyena.Data.Sqlite.HyenaDataReader) <0x00107>
  at Banshee.ServiceStack.DbIteratorJob.Iterate () <0x0011e>
  at Banshee.ServiceStack.DbIteratorJob.Run () <0x0004b>
  at Hyena.Jobs.SimpleAsyncJob.InnerStart () <0x0001d>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

"LibraryWatcher for Hudba" tid=0x0x7f8ad1a4c710 this=0x0x7f8ad2f682f0 thread handle 0x452 state : interrupted state owns ()
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x0004e>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0xffffffff>
  at System.Threading.WaitHandle.WaitOne () <0x0006b>
  at Hyena.Data.Sqlite.HyenaSqliteCommand.WaitForResult (Hyena.Data.Sqlite.HyenaSqliteConnection) <0x0002f>
  at Hyena.Data.Sqlite.HyenaSqliteConnection.Execute (Hyena.Data.Sqlite.HyenaSqliteCommand) <0x00037>
  at Hyena.Data.Sqlite.SqliteModelCache`1<Banshee.Collection.Database.DatabaseTrackInfo>.Reload () <0x000eb>
  at Banshee.Collection.Database.DatabaseTrackListModel.ReloadWithFilters (bool) <0x002b6>
  at Banshee.Collection.Database.DatabaseTrackListModel.ReloadWithoutFilters () <0x0000f>
  at Banshee.Collection.Database.DatabaseTrackListModel.Reload (Hyena.Data.IListModel) <0x003ab>
  at Banshee.Collection.Database.DatabaseTrackListModel.Reload () <0x0000f>
  at Banshee.Sources.DatabaseSource.RateLimitedReload () <0x0003b>
  at Banshee.Base.RateLimiter.InnerExecute () <0x0005e>
  at Banshee.Base.RateLimiter.Execute () <0x00077>
  at Banshee.Sources.DatabaseSource.Reload () <0x0002f>
  at Banshee.Sources.PrimarySource/<OnTracksChanged>c__AnonStorey19.<>m__13 () <0x00033>
  at Hyena.ThreadAssist.SpawnFromMain (System.Threading.ThreadStart) <0x0002c>
  at Banshee.Sources.PrimarySource.OnTracksChanged (Hyena.Query.QueryField[]) <0x0006b>
  at Banshee.Sources.DatabaseSource.OnTracksChanged () <0x00015>
  at Banshee.Sources.PrimarySource.NotifyTracksChanged () <0x0000f>
  at Banshee.LibraryWatcher.SourceWatcher.Watch () <0x0022f>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
Comment 1 Coudy 2010-09-06 18:29:28 UTC
Created attachment 169600 [details] [review]
log
Comment 2 Coudy 2010-09-06 18:30:21 UTC
added log for sure.
Comment 3 Alan McGovern 2010-09-06 21:20:56 UTC
Created attachment 169624 [details] [review]
Patch to fix the issue

It's a simple memory issue. We were freeing the native memory before we had finished using it which resulted in this issue.

If this patch is ok, feel free to commit at any time :)
Comment 4 Alan McGovern 2010-09-06 23:14:24 UTC
*** Bug 609110 has been marked as a duplicate of this bug. ***
Comment 5 Coudy 2010-09-07 05:49:50 UTC
Hi, 
this patch solved this bug. Now I can create playlists. But when I disconnect/reconnect I can see playlist in banshee doubled, on device aren't doubled. I'm attaching log doubled_playlists.log .
Comment 6 Coudy 2010-09-07 05:50:19 UTC
Created attachment 169647 [details]
doubled playlists on banshee
Comment 7 Alan McGovern 2010-09-07 09:00:33 UTC
Do you plug the device out and in again while leaving banshee running? If so, do the playlists still duplicate if you restart banshee? Also, do you mean that playlists show up twice in banshees listing but only once on-device?
Comment 8 Coudy 2010-09-07 09:23:31 UTC
Do you plug the device out and in again while leaving banshee running ?
YES
If so,do the playlists still duplicate if you restart banshee? 
YES
Also, do you mean that playlists show up twice in banshees listing but only once on-device?
YES

p.s. I'm on irc channel again.
Comment 9 Gabriel Burt 2010-09-07 19:49:28 UTC
Review of attachment 169624 [details] [review]:

Looks alright to me -- feel free to push, assuming you've done a lot of testing.
Comment 10 Alan McGovern 2010-09-07 19:54:36 UTC
Yup, i've tested a lot :) At least 20 cycles of playlisting and different variations in how they're created/populated/removed. We went from reading corrupt data when loading playlists to exactly matching the information the libmtp helper program "mtp-playlists" provides. Pushing this one to git now.
Comment 11 Alan McGovern 2010-09-08 17:33:27 UTC
Patch for the original issue has been committed. The duplicate playlist issue should be filed as a separate bug, though from my investigating it appears to be a device specific issue, therefore a libmtp bug. I'd still appreciate a bug report for it here if it doesn't go away.