GNOME Bugzilla – Bug 168362
Best crashes when I give a directory name as the search string
Last modified: 2005-03-22 06:47:15 UTC
Distribution/Version: Novell Linux Desktop 1. Start best 2. I have a directory named "suse" in which there is a file "suse.txt" 3. Run best and type the search string as "suse" 4. Click Find 5. Best Crashes The following messages are displayed on the terminal from where Best was started: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in <0xfda572c8> (wrapper managed-to-native) Gtk.Application:gtk_main () in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main () in <0x00007> Gtk.Application:Run () in <0x00007> Gnome.Program:Run () in <0x00173> Best.Best:Main (string[]) The strange part is that it seems to work fine when I give the names of the other directories in my $HOME as search string, but when I give "suse" it crashes. There is no information on the beagle daemon window when the crash happens. From the .beagle/Log I could make out that the directory suse and file suse.txt are indexed without any problems.
Unfortunately this stack trace isn't useful; the daemon doesn't crash when you do this?
I think i can reproduce this bug ;) I have a symlink named '/home/mm/nmap' to some folder. If i search for 'nmap' beagled and best crash. Same happens for 'Nmap'. Beagled does not always crash, but more often (only?) if BEAGLE_EXERCISE_THE_DOG is set. It crashes for some folders/symlinks but not for others. Like '/home/mm/temp' crashes, but '/home/mm/skel' does not. However I can see a few results added to bests result window before the core dump. I have to use a new dbus session after every crash for best to find the beagle daemon again. This is the console output from best: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in (unmanaged) 0xb7ef1c60 in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main () in <0x00007> Gtk.Application:Run () in <0x00007> Gnome.Program:Run () in <0x0014e> Best.Best:Main (string[]) This is the console output from beagled --fg: DEBUG: + email://0/INBOX/Listen-Groups/All;uid=27629 DEBUG: Helper Size: VmRSS=25.3 MB, size=2.40, 35.0% Unhandled Exception: System.ArgumentException: No handler registered for object: Beagle.Daemon.QueryImpl in <0x0007e> DBus.Service:GetHandler (object) in <0x00026> DBus.DBusType.ObjectPath:get_Path () in <0x00017> DBus.DBusType.ObjectPath:Append (intptr) in <0x0001a> DBus.Arguments:Append (DBus.DBusType.IDBusType) in <0x00099> Beagle.Daemon.QueryImpl.SignalProxy:Proxy_HitsAddedAsBinaryEvent (Beagle.QueryProxy,string) in <0x00045> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_QueryProxy_string (Beagle.QueryProxy,string) in <0x00014> Beagle.Daemon.QueryImpl:FireHitsAddedAsBinaryEvent (string) in <0x00067> SignalHoister:IdleHandler () in <0x0003b> (wrapper delegate-invoke) System.MulticastDelegate:invoke_bool () in <0x0002a> IdleProxy:Handler () in <0x00024> (wrapper native-to-managed) IdleProxy:Handler () in (unmanaged) 0xb7f686b2 in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main () in <0x00007> Gtk.Application:Run () in <0x00ba1> Beagle.Daemon.BeagleDaemon:Main (string[]) (0) mm@lila:~$ DEBUG: CloseIfQueued on MailIndex DEBUG: Flush Complete! DEBUG: CloseIfQueued on MailIndex DEBUG: CloseIfQueued on MailIndex DEBUG: Helper Size: VmRSS=25.4 MB, size=2.41, 35.2% DEBUG: Shutting down on failed TestService in BeagleDaemonWatcherTimeoutHandler DEBUG: RemoteIndexerImpl.QueueCloseForAll called DEBUG: Safe-to-close QueueClosed on FileSystemIndex DEBUG: Close on FileSystemIndex DEBUG: Safe-to-close QueueClosed on MailIndex DEBUG: Close on MailIndex DEBUG: worker removed: name=MailIndex DEBUG: Safe-to-close QueueClosed on AddressbookIndex DEBUG: Close on AddressbookIndex INFO: Beginning shutdown DEBUG: Beginning shutdown event DEBUG: Done with shutdown event INFO: Exiting ** ERROR **: Unmanaged code called delegate of type which was already garbage collected. See http://www.go-mono.com/delegate.html for an explanation and ways to fix this. aborting... /usr/lib/beagle/beagled-index-helper: line 23: 9207 Aborted (core dumped) MONO_GAC_PREFIX="/usr:$MONO_GAC_PREFIX" MONO_PATH="$THIS_PATH:$MONO_PATH" mono --debug $THIS_EXE "$@" Here is the output from gdb on the core file: (gdb) bt
+ Trace 56175
The crash does not happen if i comment out the following line: Index: TileLauncher.cs =================================================================== RCS file: /cvs/gnome/beagle/Tiles/TileLauncher.cs,v retrieving revision 1.3 diff -r1.3 TileLauncher.cs 89c89 < Template["Icon"] = Images.GetHtmlSource (ImagePath (), Hit.MimeType); --- > //Template["Icon"] = Images.GetHtmlSource (ImagePath (), Hit.MimeType);
Unfortunately, I'm not able to reproduce this.
Created attachment 38062 [details] [review] check image path before adding the icon You can't reproduce the crash or do you mean it is still crashing ? Anyway, I guess it can't hurt to check if LookupIcon returned something at all.
Jon: I am able to reproduce the bug. LookupIcon returns null and GetHtmlSource() doesn't check the sanity of "name" parameter and thus "crashes". This can be easily reproducable in NLD, give "configure network devices" as your search string. The best will crash, if it doesn't, browse through all the Hits once. I have added a check in GetHtmlSource() to verify the "name" parameter against null. Mario: Thanks for your patch and comments. :)
*** Bug 168860 has been marked as a duplicate of this bug. ***
Fixed in CVS.