GNOME Bugzilla – Bug 576033
Crash in Banshee Indexer client library
Last modified: 2009-05-19 15:22:33 UTC
Steps to reproduce: 1. Enable the GNOME Do Banshee plugin, which uses the CollectionIndexer 2. Start up GNOME Do from the beginning with Banshee closed. 3. Wait for initialization and Do will crash. Note that the stack trace below is captured from Do, so there will be some extraneous information. There are no problems when Banshee is running. Stack trace: [Info 22:26:46.856] [Services] Successfully located service of type IPreferencesService. [Info 22:26:46.861] [Services] Successfully located service of type ILogService. [Info 22:26:46.861] [Services] Successfully located service of type ISecurePreferencesService. [Info 22:26:46.874] [Services] Successfully located service of type INotificationsService. [Debug 22:26:46.878] [InterfaceManager] "Mini Interface" interface was loaded [Info 22:26:46.878] [Services] Successfully located service of type ILogService. [Debug 22:26:46.878] [InterfaceManager] "Docky" interface was loaded [Debug 22:26:46.878] [InterfaceManager] "Classic Interface" interface was loaded [Debug 22:26:46.879] [InterfaceManager] "Glass Interface" interface was loaded [Debug 22:26:46.879] [InterfaceManager] "Nouveau Interface" interface was loaded [Debug 22:26:46.882] [PluginManager] Loaded "ApplicationItemSource" from plugin. [Debug 22:26:46.883] [PluginManager] Loaded "GNOMESpecialLocationsItemSource" from plugin. [Info 22:26:46.884] [Services] Successfully located service of type AbstractApplicationService. [Debug 22:26:46.885] [PluginManager] Loaded "InternalItemSource" from plugin. [Debug 22:26:46.886] [PluginManager] Loaded "ItemSourceItemSource" from plugin. [Debug 22:26:46.886] [PluginManager] Loaded "SessionCommandsItemSource" from plugin. [Debug 22:26:46.886] [PluginManager] Loaded "ScreenItemSource" from plugin. [Debug 22:26:46.887] [PluginManager] Loaded "WindowItemSource" from plugin. [Debug 22:26:46.887] [PluginManager] Loaded "MediaItemSource" from plugin. [Debug 22:26:46.887] [PluginManager] Loaded "FileItemSource" from plugin. [Debug 22:26:46.894] [PluginManager] Loaded "RecentFileItemSource" from plugin. [Debug 22:26:46.895] [PluginManager] Loaded "EmailAction" from plugin. [Debug 22:26:46.895] [PluginManager] Loaded "OpenAction" from plugin. [Debug 22:26:46.911] [PluginManager] Loaded "OpenUrlAction" from plugin. [Debug 22:26:46.911] [PluginManager] Loaded "OpenWithAction" from plugin. [Debug 22:26:46.911] [PluginManager] Loaded "RevealAction" from plugin. [Debug 22:26:46.911] [PluginManager] Loaded "RunAction" from plugin. [Debug 22:26:46.911] [PluginManager] Loaded "CopyToClipboardAction" from plugin. [Debug 22:26:46.912] [PluginManager] Loaded "LaunchpadAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "WindowMinimizeAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "WindowMaximizeAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "WindowCloseAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "ScreenTileAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "ScreenCascadeAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "ScreenRestoreAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "PlayAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "PauseAction" from plugin. [Debug 22:26:46.917] [PluginManager] Loaded "NextAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "PreviousAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "EnqueueAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "SearchCollectionAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "NewFileAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "NewFolderAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "CopyAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "MoveAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "RenameAction" from plugin. [Debug 22:26:46.918] [PluginManager] Loaded "MoveToTrashAction" from plugin. [Info 22:26:46.921] [Services] Successfully located service of type AbstractSystemService. [Debug 22:26:46.926] [SystemService] No other application instance detected. Continue startup. [Info 22:26:46.940] [Services] Successfully located service of type IPreferencesService. [Info 22:26:46.940] [Services] Successfully located service of type ISecurePreferencesService. [Debug 22:26:46.943] [Controller] Setting theme Docky [Info 22:26:46.972] [Services] Successfully located service of type PathsService. [Info 22:26:46.995] [Services] Successfully located service of type ICoreService. [Info 22:26:47.058] [UniverseManager] Reloading universe... [Debug 22:26:47.059] [UniverseManager] Reloading actions... [Debug 22:26:47.063] [UniverseManager] Reloading item source "Applications"... [Debug 22:26:47.212] [UniverseManager] Reloading item source "GNOME Special Locations"... [Debug 22:26:47.223] [UniverseManager] Reloading item source "Internal GNOME Do Items"... [Debug 22:26:47.224] [UniverseManager] Reloading item source "GNOME Do Item Sources"... [Debug 22:26:47.225] [UniverseManager] Reloading item source "GNOME Session Commands"... [Debug 22:26:47.226] [UniverseManager] Reloading item source "Window Screen Items"... [Debug 22:26:47.227] [UniverseManager] Reloading item source "Generic Window Items"... [Debug 22:26:47.227] [UniverseManager] Reloading item source "Banshee Media"... [Debug 22:26:47.236] Acquiring org.freedesktop.DBus session instance [Debug 22:26:47.237] [UniverseManager] Reloading item source "Files and Folders"... [Debug 22:26:47.244] Starting org.bansheeproject.CollectionIndexer [Debug 22:26:47.257] [IndexedFolderCollection] Loaded Files and Folders plugin state. [Info 22:26:47.270] [Services] Successfully located service of type IUniverseFactoryService. [Debug 22:26:47.288] [UniverseManager] Reloading item source "Recent Files"... [Info 22:26:47.288] [UniverseManager] Universe contains 411 items. [Debug 22:26:47.297] [RelevanceProvider] Successfully loaded learned usage data. [Debug 22:26:47.488] NameOwnerChanged: org.bansheeproject.CollectionIndexer, '' => ':1.124' [Debug 22:26:47.488] Resolving org.bansheeproject.CollectionIndexer.Service (attempt 1) [Debug 22:26:47.642] NameOwnerChanged: org.bansheeproject.CollectionIndexer, ':1.124' => '' [Debug 22:26:49.642] Resolving org.bansheeproject.CollectionIndexer.Service (attempt 2) [Debug 22:26:50.016] NameOwnerChanged: org.bansheeproject.CollectionIndexer, '' => ':1.125' [Debug 22:26:52.016] Resolving org.bansheeproject.CollectionIndexer.Service (attempt 3) [Debug 22:26:52.289] NameOwnerChanged: org.bansheeproject.CollectionIndexer, ':1.125' => '' [Debug 22:26:52.289] NameOwnerChanged: org.bansheeproject.CollectionIndexer, '' => ':1.126' [Debug 22:26:54.289] Resolving org.bansheeproject.CollectionIndexer.Service (attempt 4) [Debug 22:26:54.570] NameOwnerChanged: org.bansheeproject.CollectionIndexer, ':1.126' => '' [Debug 22:26:54.570] NameOwnerChanged: org.bansheeproject.CollectionIndexer, '' => ':1.127' [Debug 22:26:56.570] Connected to org.bansheeproject.CollectionIndexer.Service Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at Banshee.Collection.Indexer.RemoteHelper.IndexerClient.ConnectToIndexerService () [0x00000] at Banshee.Collection.Indexer.RemoteHelper.IndexerClient.OnBusNameOwnerChanged (System.String name, System.String oldOwner, System.String newOwner) [0x00000] at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x00167> at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002d> at System.Delegate.DynamicInvokeImpl (object[]) <0x001bb> at System.MulticastDelegate.DynamicInvokeImpl (object[]) <0x0003b> at System.Delegate.DynamicInvoke (object[]) <0x00019> at NDesk.DBus.Connection.HandleSignal (NDesk.DBus.Message) <0x0014b> at NDesk.DBus.Connection.DispatchSignals () <0x0004f> at NDesk.DBus.Connection.Iterate () <0x0003f> at <>c__CompilerGenerated0.<>c__AnonymousMethod1 (intptr,NDesk.GLib.IOCondition,intptr) <0x00033> at (wrapper native-to-managed) <>c__CompilerGenerated0.<>c__AnonymousMethod1 (intptr,NDesk.GLib.IOCondition,intptr) <0x00077> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x0004d> at Gtk.Application.Run () <0x0000b> at Do.Do.Main (string[]) <0x002af> Other information:
*** Bug 583018 has been marked as a duplicate of this bug. ***
The bug can also be reproduced with: $ banshee-1 --indexer --debug
Created attachment 134918 [details] [review] Fixes crash in indexer client when full banshee client is not running The preferences service was not being started in the Beroe client. Added a fix to make sure if something like this happens in the future, it won't result in crashes for the client, and also fixed this specific crash.
Created attachment 134919 [details] [review] This is an almost identical patch which I like slightly better
Thanks Alex, pushed to stable and master.