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 168362 - Best crashes when I give a directory name as the search string
Best crashes when I give a directory name as the search string
Status: VERIFIED FIXED
Product: beagle
Classification: Other
Component: General
unspecified
Other Linux
: Normal critical
: ---
Assigned To: Veerapuram Varadhan
Veerapuram Varadhan
: 168860 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-02-24 09:30 UTC by Subodh Soni
Modified: 2005-03-22 06:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check image path before adding the icon (455 bytes, patch)
2005-02-28 18:04 UTC, Mario Manno
none Details | Review

Description Subodh Soni 2005-02-24 09:30:53 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.
Comment 1 Joe Shaw 2005-02-24 19:25:20 UTC
Unfortunately this stack trace isn't useful; the daemon doesn't crash when you
do this?
Comment 2 Mario Manno 2005-02-26 19:00:41 UTC
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
  • #0 raise
    from /lib/tls/libc.so.6
  • #1 abort
    from /lib/tls/libc.so.6
  • #2 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #3 g_log
    from /usr/lib/libglib-2.0.so.0
  • #4 mono_precompile_assemblies
  • #5 ??
  • #6 ??
  • #7 mono_burg_decode_i8con
  • #8 ??
  • #9 ??
  • #10 dbus_bus_remove_match
    from /usr/lib/libdbus-1.so.0
  • #11 dbus_connection_unregister_object_path
    from /usr/lib/libdbus-1.so.0
  • #12 ??
  • #13 ??
  • #14 ??
  • #49 mono_codegen
  • #50 ??
  • #51 ??
  • #52 ??
  • #53 ??
  • #54 ??
  • #55 ??
  • #56 ??
  • #57 mono_runtime_invoke
  • #58 ??
  • #59 ??
  • #60 ??
  • #61 ??
  • #62 ??
  • #63 ??
  • #64 ??
  • #65 mono_gc_cleanup
  • #66 ??
  • #67 ??
  • #68 ??
  • #69 ??
  • #70 ??
  • #71 ??
  • #72 ??
  • #73 ??
  • #74 ??
  • #75 ??
  • #76 ??
  • #77 mono_gc_cleanup
  • #78 ??
  • #79 ??
  • #80 ??
  • #81 ??
  • #82 ??
  • #83 ??
  • #84 mono_gc_cleanup
  • #85 mono_thread_interruption_request_flag
  • #86 ??
  • #87 ??
  • #88 mono_gc_cleanup
  • #89 pthread_getspecific
    from /lib/tls/libpthread.so.0

Comment 3 Mario Manno 2005-02-28 17:02:45 UTC
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);
Comment 4 Jon Trowbridge 2005-02-28 17:37:35 UTC
Unfortunately, I'm not able to reproduce this.
Comment 5 Mario Manno 2005-02-28 18:04:33 UTC
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.
Comment 6 Veerapuram Varadhan 2005-03-01 14:22:42 UTC
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. :)
Comment 7 Jon Trowbridge 2005-03-01 14:38:17 UTC
*** Bug 168860 has been marked as a duplicate of this bug. ***
Comment 8 Jon Trowbridge 2005-03-01 14:38:43 UTC
Fixed in CVS.