GNOME Bugzilla – Bug 572829
Banshee won't start without a transcoder cache directory
Last modified: 2009-02-23 13:05:20 UTC
Steps to reproduce: 1. Delete transcoder cache directory (~/.cache/banshee-1/transcoder) 2. Start banshee 3. Profit! Stack trace: widget% banshee-1 [Info 17:19:03.350] Running Banshee 1.4.2: [source-tarball (freebsd8.0, i386) @ 2009-02-22 16:58:46 CST] Xlib: extension "Generic Event Extension" missing on display ":0.0". Xlib: extension "Generic Event Extension" missing on display ":0.0". Xlib: extension "Generic Event Extension" missing on display ":0.0". Xlib: extension "Generic Event Extension" missing on display ":0.0". Xlib: extension "Generic Event Extension" missing on display ":0.0". Xlib: extension "Generic Event Extension" missing on display ":0.0". /home/rnoland/.gtkrc-2.0:2: Unable to find include file: ".gtkrc-2.0-scrollbar_cog" Stacktrace: at (wrapper managed-to-native) Mono.Unix.Native.Syscall.sys_strerror_r (int,System.Text.StringBuilder,ulong) <0x00004> at (wrapper managed-to-native) Mono.Unix.Native.Syscall.sys_strerror_r (int,System.Text.StringBuilder,ulong) <0xffffffff> at Mono.Unix.Native.Syscall.strerror_r (Mono.Unix.Native.Errno,System.Text.StringBuilder,ulong) <0x0001f> at Mono.Unix.Native.Syscall.strerror_r (Mono.Unix.Native.Errno,System.Text.StringBuilder) <0x00032> at Mono.Unix.ErrorMarshal.strerror_r (Mono.Unix.Native.Errno) <0x00054> at Mono.Unix.ErrorMarshal..cctor () <0x00035> at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff> at Mono.Unix.UnixMarshal.GetErrorDescription (Mono.Unix.Native.Errno) <0xffffffff> at Mono.Unix.UnixMarshal.GetErrorDescription (Mono.Unix.Native.Errno) <0x00008> at Mono.Unix.UnixMarshal.CreateExceptionForError (Mono.Unix.Native.Errno) <0x0001c> at Mono.Unix.UnixMarshal.CreateExceptionForLastError () <0x00013> at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () <0x0000a> at Mono.Unix.UnixDirectoryInfo.GetEntries () <0x00053> at Mono.Unix.UnixDirectoryInfo.GetFileSystemEntries () <0x0000d> at Mono.Unix.UnixDirectoryInfo.Delete (bool) <0x0001c> at Banshee.IO.Unix.Directory.Delete (string,bool) <0x0002f> at Banshee.IO.Directory.Delete (string,bool) <0x00023> at Banshee.MediaEngine.TranscoderService..ctor () <0x00031> at (wrapper runtime-invoke) System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff> at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (object,object[],System.Exception&) <0x00004> at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (object,object[],System.Exception&) <0xffffffff> at System.Reflection.MonoCMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000bd> at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x0001c> at System.Reflection.ConstructorInfo.Invoke (object[]) <0x00035> at System.Activator.CreateInstance (System.Type,bool) <0x000f7> at System.Activator.CreateInstance (System.Type) <0x0000c> at Banshee.ServiceStack.ServiceManager.RegisterService (System.Type) <0x00030> at Banshee.ServiceStack.ServiceManager.Run () <0x00081> at Banshee.ServiceStack.Application.Run () <0x00059> at Banshee.Gui.GtkBaseClient.Initialize (bool) <0x00160> at Banshee.Gui.GtkBaseClient..ctor (bool,string) <0x00026> at Banshee.Gui.GtkBaseClient..ctor () <0x00019> at Nereid.Client..ctor () <0x0000d> at (wrapper runtime-invoke) System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff> at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (object,object[],System.Exception&) <0x00004> at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (object,object[],System.Exception&) <0xffffffff> at System.Reflection.MonoCMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000bd> at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x0001c> at System.Reflection.ConstructorInfo.Invoke (object[]) <0x00035> at System.Activator.CreateInstance (System.Type,bool) <0x000f7> at System.Activator.CreateInstance (System.Type) <0x0000c> at Banshee.Gui.GtkBaseClient.Startup () <0x0000f> at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.CleanRoomStartup/StartupInvocationHandler) <0x000a2> at Banshee.Gui.GtkBaseClient.Startup () <0x00038> at Banshee.Gui.GtkBaseClient.Startup (string[]) <0x000b9> at Nereid.Client.Main (string[]) <0x0000a> at (wrapper runtime-invoke) Nereid.Client.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff> at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly (System.Reflection.Assembly,string[]) <0x00004> at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly (System.Reflection.Assembly,string[]) <0xffffffff> at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly,string[]) <0x00028> at System.AppDomain.ExecuteAssembly (string,System.Security.Policy.Evidence,string[]) <0x00021> at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly (string,System.Security.Policy.Evidence,string[]) <0xffffffff> at System.AppDomain.ExecuteAssembly (string) <0x00014> at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly (string) <0xffffffff> at Booter.Booter.BootClient (string) <0x00055> at Booter.Booter.Main () <0x00188> at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff> zsh: abort banshee-1 Other information: Quick fix: mkdir -p ~/.cache/banshee-1/transcoder
Created attachment 129302 [details] [review] Check if directory exists first
Deleting a non existing directory should throw an exception which would then be caught by the code. In your case, it looks like no exception is thrown, but it causes a crash. I wasn't able to reproduce this on my linux system with mono 2.2. Which version of mono do you have ? Maybe the issue is specific to FreeBSD.
Using mono 2.0.1. I never got that crash with 1.2.5 but I probably had that directory a long time ago. Just happened to run into it when I reinstalled my laptop.
Created attachment 129309 [details] Simple test case : delete a non existing directory Here's a simple test program that tries to delete a non existing directory /tmp/non_existing. Please save the file as TestDelete.exe then run the following : mono TestDelete.exe You should get a System.IO.FileNotFoundException. If you don't, please file a bug with Mono, with all relevant info and the test case. Here's the source code of the test case : public class TestDelete { public static void Main() { Mono.Unix.UnixDirectoryInfo unix_dir = new Mono.Unix.UnixDirectoryInfo ("/tmp/non_existing"); unix_dir.Delete (true); } }
This is certainly a bug in mono. Filed at : https://bugzilla.novell.com/show_bug.cgi?id=478652