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 724635 - iPod sync crashes
iPod sync crashes
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Device - iPod
2.6.1
Other Linux
: Normal major
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-18 12:41 UTC by cidthecoatrack
Modified: 2014-03-15 12:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (809 bytes, patch)
2014-02-18 23:35 UTC, Andrés G. Aragoneses (IRC: knocte)
none Details | Review
Patched Banshee.Services.dll (567.50 KB, application/octet-stream)
2014-02-23 01:00 UTC, Andrés G. Aragoneses (IRC: knocte)
  Details

Description cidthecoatrack 2014-02-18 12:41:42 UTC
When syncing my iPod, Banshee crashes.  This is the error thrown to the terminal:

[Warn  16:00:42.838] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0

Unhandled Exception: System.InvalidOperationException: out of sync
  at System.Collections.Generic.Dictionary`2+Enumerator[System.Int32,System.Int32].VerifyState () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+Enumerator[System.Int32,System.Int32].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection+Enumerator[System.Int32,System.Int32].MoveNext () [0x00000] in <filename unknown>:0 
  at Banshee.Collection.Database.DatabaseImportManager.NotifyAllSources () [0x00000] in <filename unknown>:0 
  at Banshee.Collection.Database.DatabaseImportManager.OnFinished () [0x00000] in <filename unknown>:0 
  at Hyena.Collections.QueuePipeline`1[System.String].OnElementFinished (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0 
  at Hyena.Collections.QueuePipelineElement`1[System.String].OnFinished () [0x00000] in <filename unknown>:0 
  at Hyena.Collections.QueuePipelineElement`1[System.String].Processor (System.Object state) [0x00000] in <filename unknown>:0 

I am running 2.6.1 on Xubuntu 13.10.  It should also be noted that when I try to do a sql dump to repair the database, it ends up wiping out almost everything.
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2014-02-18 12:51:53 UTC
(In reply to comment #0)
> I am running 2.6.1 on Xubuntu 13.10.  It should also be noted that when I try
> to do a sql dump to repair the database, it ends up wiping out almost
> everything.

Thanks for your bug report. What made you think that you needed to repair the database?

And what happens if you repair your DB and try to sync your iPod again?
Comment 2 cidthecoatrack 2014-02-18 23:28:14 UTC
When Banshee isn't working/crashing, I do a sql dump just to see if it fixes anything.  This time, it actually erases pretty much all of my music and playlists.  I haven't tried syncing it after the repair (since it wiped out the music and all).  I restored a backup of the database, but that still leaves the crashing when it tries to sync.
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2014-02-18 23:35:04 UTC
Created attachment 269637 [details] [review]
Proposed patch

Can you test this patch?
Comment 4 cidthecoatrack 2014-02-19 01:57:18 UTC
I am having some problems getting my Banshee to build to test the patch - but once I get it figured out, I'll report back with the findings.  With the speed of my computer, it will probably be a few days of running the iPod sync until I know whether the bug has been fixed.
Comment 5 Andrés G. Aragoneses (IRC: knocte) 2014-02-23 01:00:00 UTC
Created attachment 270025 [details]
Patched Banshee.Services.dll

Here you have a new Banshee.Services.dll, from 2.6.1 version, but with my patch applied. Before copying it to your computer, please:

a) Double-check that you still reproduce the bug.
b) Back up your Banshee.Services.dll copying to somewhere else.

Then you can overwrite your dll, run banshee again and see if it fixes the bug.

If you have any problem running banshee with this DLL, please tell me your distro name and version.
Comment 6 cidthecoatrack 2014-02-24 01:27:13 UTC
Alright, so this is odd.  So I uninstalled Banshee and reinstalled it (I botched applying your patch).  Upon reinstalling and attempting to verify the bug, I get a new error this time:

Cannot Convert File - Could not open file "/home/derpy/.cache/banshee-1/transcoder/8a2c1d50-cad7-458f-85b3-74e831d302d8.mp3" for writing.: gstfilesink.c(423): gst_file_sink_open_file (): /GstPipeline:pipeline/GstBin:sinkbin/GstFileSink:sink:
system error: Too many open files

(Banshee:13311): GStreamer-CRITICAL **: gst_poll_get_read_gpollfd: assertion 'set != NULL' failed

(Banshee:13311): GStreamer-CRITICAL **: gst_bus_create_watch: assertion 'bus->priv->poll != NULL' failed

(Banshee:13311): GLib-CRITICAL **: g_source_set_callback: assertion 'source != NULL' failed
Stacktrace:

  at (wrapper managed-to-native) Banshee.GStreamer.Transcoder.gst_transcoder_transcode (System.Runtime.InteropServices.HandleRef,intptr,intptr,string) <0xffffffff>
  at Banshee.GStreamer.Transcoder.TranscodeTrack (Banshee.Collection.TrackInfo,Hyena.SafeUri,Banshee.MediaProfiles.ProfileConfiguration) <0x00157>
  at Banshee.MediaEngine.TranscoderService.ProcessQueue () <0x001ad>
  at Banshee.MediaEngine.TranscoderService.OnError (object,Banshee.MediaEngine.TranscoderErrorArgs) <0x000a3>
  at Banshee.GStreamer.Transcoder.OnError (Banshee.Collection.TrackInfo,string) <0x00063>
  at Banshee.GStreamer.Transcoder.OnNativeError (intptr,intptr,intptr) <0x000f4>
  at (wrapper native-to-managed) Banshee.GStreamer.Transcoder.OnNativeError (intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
  at Gtk.Application.Run () <0x0000b>
  at Banshee.Gui.GtkBaseClient.Run () <0x0005f>
  at Banshee.Gui.GtkBaseClient.Startup () <0x00049>
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.CleanRoomStartup/StartupInvocationHandler) <0x0008e>
  at Banshee.Gui.GtkBaseClient.Startup<T> () <0x0006b>
  at Banshee.Gui.GtkBaseClient.Startup<T> (string[]) <0x000ff>
  at Nereid.Client.Main (string[]) <0x00017>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly (System.AppDomain,System.Reflection.Assembly,string[]) <0xffffffff>
  at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly,string[]) <0x00047>
  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 () <0x001db>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	banshee() [0x49d619]
	banshee() [0x4ee15b]
	banshee() [0x4220cd]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xfbb0) [0x7f368bbf8bb0]
	/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_source_attach+0x7) [0x7f368a30d3c7]
	/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0x3b388) [0x7f367c6ed388]
	/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(gst_bus_add_watch_full+0x8f) [0x7f367c6ed49f]
	/usr/lib/banshee/libbanshee.so(gst_transcoder_transcode+0x2a6) [0x7f367d707fa6]
	[0x413139f7]
* Assertion at mini-exceptions.c:2181, condition `res != -1' not met

Aborted (core dumped)


Which leads me to ask: how is it that the system has too many open files?
Comment 7 Andrés G. Aragoneses (IRC: knocte) 2014-02-24 12:22:06 UTC
(In reply to comment #6)
> I get a new error this time:

What distro are you using? What version? What version of Mono?
What version of gstreamer does it have?


> 
> Cannot Convert File - Could not open file
> "/home/derpy/.cache/banshee-1/transcoder/8a2c1d50-cad7-458f-85b3-74e831d302d8.mp3"
> for writing.: gstfilesink.c(423): gst_file_sink_open_file ():
> /GstPipeline:pipeline/GstBin:sinkbin/GstFileSink:sink:
> system error: Too many open files


This error sounds familiar, I think someone has reported it in the past. Please try to find it in bugzilla.

The only thing I can recommend now is to try to avoid tracks that need transcoding (backup your banshee DB, and remove these tracks, then you can test iPod sync again), because it seems to fail when doing this.
Comment 8 cidthecoatrack 2014-02-24 13:33:54 UTC
Distro: Xunbuntu 13.10
Mono: 2.10.8.1
GStreamer: I see a lot of 1.2 and 0.10?  Looks like 0.10 is mostly plug-ins, so I would assume the version of the package being used by Banshee is the 1.2

The only bug that turned up with searching was https://bugzilla.gnome.org/show_bug.cgi?id=701438, which doesn't seem to be the same issue.

I have an mp3-only playlist I can use for syncing in the meanwhile.  I might have been able to reproduce the old bug (the one we were originally troubleshooting) in other ways, but do not know for sure yet.  If I successfully manage to reproduce it another way, I will share.
Comment 9 Andrés G. Aragoneses (IRC: knocte) 2014-03-15 12:31:07 UTC
I have committed the fix that I proposed in comment#3 because I'm confident it would fix the bug (and if not, I'm confident it's harmless, I mean, that it would not affect other parts of the code). I also backported the fix (manually) to the stable branch. This means that you can test this fix when 2.9.1 version comes out (very soon now) or 2.6.3 (if it ever gets released). If by testing this you find the 'system error: Too many open files' problem reported above, please file a new bug report for it.

This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.