GNOME Bugzilla – Bug 635779
Banshee crashes after enabling and disabling all the Extensions
Last modified: 2011-01-30 07:37:24 UTC
Banshee crashes if you do the following: 1- Go to preferences and choose the extension tab 2- Enable all the extensions available there. 3- Go to the preferences dialog again and choose the extension tab once more. 4- Disable all the extensions available there. 5- Go to the preferences dialog again What happened: Banshee crashes "Stacktrace: at (wrapper managed-to-native) Gtk.Notebook.gtk_notebook_append_page (intptr,intptr,intptr) <0x00004> at (wrapper managed-to-native) Gtk.Notebook.gtk_notebook_append_page (intptr,intptr,intptr) <0x00004> at Gtk.Notebook.AppendPage (Gtk.Widget,Gtk.Widget) <0x00047> at Banshee.Preferences.Gui.PreferenceDialog.LoadPage (Banshee.Preferences.Page) <0x000e6> at Banshee.Preferences.Gui.PreferenceDialog.LoadPages () <0x0004a> at Banshee.Preferences.Gui.PreferenceDialog..ctor () <0x00091> at Banshee.Gui.GlobalActions.OnPreferences (object,System.EventArgs) <0x00022> at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) <0x0004c> at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00004> at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00004> at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x0012a> at System.Reflection.MethodBase.Invoke (object,object[]) <0x00025> at System.Delegate.DynamicInvokeImpl (object[]) <0x0018a> at System.MulticastDelegate.DynamicInvokeImpl (object[]) <0x00034> at System.Delegate.DynamicInvoke (object[]) <0x00019> at GLib.Signal.ClosureInvokedCB (object,GLib.ClosureInvokedArgs) <0x00126> at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs) <0x00023> at GLib.SignalClosure.MarshalCallback (intptr,intptr,uint,intptr,intptr,intptr) <0x00228> at (wrapper native-to-managed) GLib.SignalClosure.MarshalCallback (intptr,intptr,uint,intptr,intptr,intptr) <0x00052> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> at Gtk.Application.Run () <0x0000a> at Banshee.Gui.GtkBaseClient.Run () <0x00054> at Banshee.Gui.GtkBaseClient.Startup () <0x0003f> at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.CleanRoomStartup/StartupInvocationHandler) <0x00089> at Banshee.Gui.GtkBaseClient.Startup<object> () <0x0005c> at Banshee.Gui.GtkBaseClient.Startup<object> (string[]) <0x000d8> at Nereid.Client.Main (string[]) <0x00015> at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0x00043> 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[]) <0x00004> at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly,string[]) <0x0002e> at System.AppDomain.ExecuteAssembly (string,System.Security.Policy.Evidence,string[]) <0x00025> at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly (string,System.Security.Policy.Evidence,string[]) <0x00067> at System.AppDomain.ExecuteAssembly (string) <0x00019> at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly (string) <0x00057> at Booter.Booter.BootClient (string) <0x00069> at Booter.Booter.Main () <0x001ac> at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0003a> Native stacktrace: banshee-1() [0x80d4d0b] banshee-1() [0x810ffeb] [0x81140c] /usr/lib/libgtk-x11-2.0.so.0(+0xa4abf) [0x136cabf] /usr/lib/libgtk-x11-2.0.so.0(+0xa7292) [0x136f292] /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__OBJECT+0x9c) [0x5dc258c] /usr/lib/libgobject-2.0.so.0(+0xae07) [0x5da2e07] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x192) [0x5da44b2] /usr/lib/libgobject-2.0.so.0(+0x1f916) [0x5db7916] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x6f5) [0x5dc0ee5] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x32) [0x5dc10c2] /usr/lib/libgtk-x11-2.0.so.0(+0x2a39b2) [0x156b9b2] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3b43) [0x156bb43] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c2f) [0x156bc2f] /usr/lib/libgtk-x11-2.0.so.0(+0x1f1c8b) [0x14b9c8b] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0xa4) [0x137a304] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c16) [0x156bc16] /usr/lib/libgtk-x11-2.0.so.0(+0x6e38a) [0x133638a] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0xa4) [0x137a304] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c16) [0x156bc16] /usr/lib/libgtk-x11-2.0.so.0(+0x1020bb) [0x13ca0bb] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0xa4) [0x137a304] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c16) [0x156bc16] /usr/lib/libgtk-x11-2.0.so.0(+0x7145d) [0x133945d] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0xa4) [0x137a304] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c16) [0x156bc16] /usr/lib/libgtk-x11-2.0.so.0(+0x175e94) [0x143de94] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0xa4) [0x137a304] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c16) [0x156bc16] /usr/lib/libgtk-x11-2.0.so.0(+0x7145d) [0x133945d] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0xa4) [0x137a304] /usr/lib/libgtk-x11-2.0.so.0(+0x2a3c16) [0x156bc16] /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_reset_rc_styles+0x80) [0x156bcc0] /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_set_parent+0x170) [0x156d360] /usr/lib/libgtk-x11-2.0.so.0(+0x17a6a2) [0x14426a2] /usr/lib/libgtk-x11-2.0.so.0(gtk_notebook_insert_page_menu+0x140) [0x1441c10] /usr/lib/libgtk-x11-2.0.so.0(gtk_notebook_append_page+0x103) [0x14421e3] [0x569661b] [0x56965c0] [0x3697e27] [0x3697ccb] [0x678bdca] [0x678bccb] [0x39bd325] banshee-1() [0x8061328] banshee-1(mono_runtime_invoke+0x40) [0x813c890] banshee-1(mono_runtime_invoke_array+0x2a4) [0x81421a4] banshee-1() [0x8130f09] [0x3f7ad0] [0x3f75c3] [0x3f7106] [0x39bd18b] [0x96dcefd] [0x96dcec2] [0x96dce97] [0x96dcd64] [0x96db871] [0x17badc3] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x192) [0x5da44b2] /usr/lib/libgobject-2.0.so.0(+0x2049b) [0x5db849b] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x6f5) [0x5dc0ee5] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x32) [0x5dc10c2] /usr/lib/libgtk-x11-2.0.so.0(+0x5e8f5) [0x13268f5] /usr/lib/libgtk-x11-2.0.so.0(gtk_action_activate+0x8d) [0x13273ad] /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x7c) [0x5dc188c] /usr/lib/libgobject-2.0.so.0(+0xae07) [0x5da2e07] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x192) [0x5da44b2] /usr/lib/libgobject-2.0.so.0(+0x1f916) [0x5db7916] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x6f5) [0x5dc0ee5] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x32) [0x5dc10c2] /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_activate+0x95) [0x1562cd5] /usr/lib/libgtk-x11-2.0.so.0(gtk_menu_shell_activate_item+0x121) [0x142e241] /usr/lib/libgtk-x11-2.0.so.0(+0x1666c1) [0x142e6c1] /usr/lib/libgtk-x11-2.0.so.0(+0x1577f3) [0x141f7f3] /usr/lib/libgtk-x11-2.0.so.0(+0x14d0f8) [0x14150f8] /usr/lib/libgobject-2.0.so.0(+0xae07) [0x5da2e07] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x192) [0x5da44b2] /usr/lib/libgobject-2.0.so.0(+0x1ffa5) [0x5db7fa5] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x58f) [0x5dc0d7f] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x32) [0x5dc10c2] /usr/lib/libgtk-x11-2.0.so.0(+0x29bf26) [0x1563f26] /usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0xcd) [0x1412e1d] /usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x337) [0x1413237] /usr/lib/libgdk-x11-2.0.so.0(+0x5bbba) [0xe7abba] /lib/libglib-2.0.so.0(g_main_context_dispatch+0x1c8) [0xba64e8] /lib/libglib-2.0.so.0(+0x40cb0) [0xba6cb0] /lib/libglib-2.0.so.0(g_main_loop_run+0x183) [0xba7373] /usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb9) [0x1411e89] [0x7a9bebe] [0x7a9be83] [0x7a9bc0d] [0xa1f578] [0xa1f41a] [0xa1f34d] [0x4009b1] [0x40082e] [0x400884] banshee-1() [0x8061328] banshee-1(mono_runtime_invoke+0x40) [0x813c890] banshee-1(mono_runtime_exec_main+0xde) [0x81403de] [0x4007bf] [0x40067f] [0x40054e] [0x4004f8] [0x40047a] [0x400430] [0x400232] [0x32b35d] [0x32b463] banshee-1() [0x8061328] banshee-1(mono_runtime_invoke+0x40) [0x813c890] banshee-1(mono_runtime_exec_main+0xde) [0x81403de] banshee-1(mono_runtime_run_main+0x112) [0x81406e2] banshee-1(mono_main+0x1679) [0x80b2f99] banshee-1() [0x8059385] /lib/libc.so.6(__libc_start_main+0xe7) [0x1d7ce7] banshee-1() [0x80592c1] "
Confirmed, also happens with git master.
Created attachment 175420 [details] [review] Dispose the preference page when removing a source The crash happens when you disable the Audiobook or the Podcast extension, and then re-open the preference dialog. It happens because, for extension sources that inherit from LibrarySource, the PreferencesPage is not disposed when you disable the extension. The "Source specific" preference page then still has a reference to that SourcePage instance. The SourcePage holds a reference to the Source instance, which is now disposed. When you then re-open the preferences dialog, it tries to render the "Source specific" page and bad things happen : a crash. This patch fixes this by disposing the preference page in SourceManager.RemoveSource. It's the least intrusive fix I could think of. What I don't like about it is that if there was no PreferencesPage instance, it creates one just to dispose it... Suggestions welcome !
It seems like it belongs in the Source.Dispose method (which doesn't exist atm). The protected Remove method in Source does already dispose the prefs_page -- not sure where it's called from though. I do think we need a solution that doesn't create the prefs page if it didn't exist.
Should be fixed in master.