Bug 203519 - beagle-search crash: Unhandled Exception: System.ArgumentNullException: null key
Summary: beagle-search crash: Unhandled Exception: System.ArgumentNullException: null key
Alias: None
Product: Fedora
Classification: Fedora
Component: beagle
Version: rawhide
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2006-08-22 09:17 UTC by Peter Eriksen
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2006-08-23 23:02:52 UTC

Attachments (Terms of Use)
beagle-query --verbose abe (150.07 KB, text/plain)
2006-08-23 14:40 UTC, Peter Eriksen
no flags Details
~/.beagle/Log/current-Beagle (3.14 KB, application/octet-stream)
2006-08-23 17:54 UTC, Peter Eriksen
no flags Details
.beagle/Log/current-IndexHelperExceptions (7.64 KB, application/octet-stream)
2006-08-23 17:57 UTC, Peter Eriksen
no flags Details
Log that seems to touch the bug (196.48 KB, text/plain)
2006-08-23 18:28 UTC, Peter Eriksen
no flags Details
Patch which fixes this and adds some sanity checks (3.17 KB, patch)
2006-08-23 19:29 UTC, Joe Shaw
no flags Details | Diff

Description Peter Eriksen 2006-08-22 09:17:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060808 Fedora/ Firefox/ pango-text

Description of problem:
The beagle-search GUI crashes, when words are typed into the search field.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run beagle-search from a terminal as a normal user.
2. Begin typing in the search field.

Actual Results:
]$ beagle-search 

Unhandled Exception: System.ArgumentNullException: null key
Parameter name: key
at System.Collections.Hashtable.get_Item (object) <0x0017a>
at Search.Tiles.IMLog.LoadIcon (Gtk.Image,int) <0x000cf>
at Search.Tiles.TileFlat.OnRealized () <0x00071>
at Gtk.Widget.realized_cb (intptr) <0x00036>
at (wrapper native-to-managed) Gtk.Widget.realized_cb (intptr) <0x00032>
in (unmanaged) 0x4331b138
at (wrapper managed-to-native) Gtk.Widget.gtk_widget_set_parent (intptr,intptr) <0x00004>
at Gtk.Widget.set_Parent (Gtk.Widget) <0x00037>
at Search.Category.OnAdded (Gtk.Widget) <0x00068>
at Search.ConversationCategory.OnAdded (Gtk.Widget) <0x00017>
at Gtk.Container.added_cb (intptr,intptr) <0x00063>
at (wrapper native-to-managed) Gtk.Container.added_cb (intptr,intptr) <0x00035>
in (unmanaged) 0x4331a648
at (wrapper managed-to-native) Gtk.Container.gtk_container_add (intptr,intptr) <0x00004>
at Gtk.Container.Add (Gtk.Widget) <0x00037>
at Search.GroupView.AddHit (Search.Tiles.Tile) <0x000d2>
at Search.MainWindow.OnHitsAdded (Beagle.HitsAddedResponse) <0x000b7>
at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_HitsAddedResponse (Beagle.HitsAddedResponse) <0x0003b>
at Beagle.Query.OnHitsAdded (Beagle.ResponseMessage) <0x0003a>
at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_ResponseMessage (Beagle.ResponseMessage) <0x0003b>
at Beagle.RequestMessage.OnAsyncResponse (Beagle.ResponseMessage) <0x00042>
at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_ResponseMessage (Beagle.ResponseMessage) <0x0003b>
at EventThrowingClosure.ThrowEvent () <0x00023>
at (wrapper delegate-invoke) System.MulticastDelegate.invoke_bool () <0x00037>
at IdleProxy.Handler () <0x0002a>
at (wrapper native-to-managed) IdleProxy.Handler () <0x00036>
in (unmanaged) 0x43197610
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
at Gtk.Application.Run () <0x00007>
at Gnome.Program.Run () <0x00007>
at Search.MainWindow.Main (string[]) <0x000f8>

Expected Results:
Beagle should show the search results.

Additional info:

Comment 1 Alexander Larsson 2006-08-22 09:50:40 UTC
Very strange. I don't see this in 0.2.8-2. It seems like a gtk related crash.
Could you try testing things like different themes to see if that makes it go away?

Comment 2 Peter Eriksen 2006-08-22 10:41:54 UTC
I tried different themes, but the crash still happened in the same way.

Comment 3 Alexander Larsson 2006-08-22 14:10:22 UTC
Does it crash whatever you type, or does it depend? 
The crash seems to be when loading an icon for an IM conversation hit, so maybe
it only crashes when you hit something like that?

Comment 4 Peter Eriksen 2006-08-22 15:31:04 UTC
Infact it only crashes sometimes, e.g. I can get away with typing just 'a', and
then it finds just one folder.  It is able to find some things before crashing,
so your suggestion sound quite plausible.

Comment 5 Alexander Larsson 2006-08-23 11:49:20 UTC
Could you verify that its in fact the IM log that is the problem.
I.E. search for something that you know won't be in the gaim logs, and something
that you know will only be there.

Comment 6 Alexander Larsson 2006-08-23 12:25:30 UTC
Hmm. Getting gaim conversation hits works for me.

Comment 7 Peter Eriksen 2006-08-23 12:38:06 UTC
(In reply to comment #6)
> Hmm. Getting gaim conversation hits works for me.
Yes, it works for me too.  I typed 'æ' in beagle-search, and an IM showed up. 
When I clicked it, it correctly opened Gaim's log to the right place.  So it is
not Gaim in particular.

Comment 8 Alexander Larsson 2006-08-23 13:48:12 UTC
Can you run "beagle-search --verbose blah" on the command line, replacing blah
with a query that crashes, and post the output here.

Comment 9 Joe Shaw 2006-08-23 13:49:59 UTC
beagle-query --verbose, not beagle-search.

Comment 10 Peter Eriksen 2006-08-23 14:40:30 UTC
Created attachment 134716 [details]
beagle-query --verbose abe

Comment 11 Peter Eriksen 2006-08-23 14:41:56 UTC
(In reply to comment #10)
> Created an attachment (id=134716) [edit]
> beagle-query --verbose abe
I have obscured a couple of email addresses and aliases for privacy reasons.

Comment 12 Alexander Larsson 2006-08-23 15:18:45 UTC
PaUri: (null)
 Snip: (19:04:33) datenmaulwurf: @index <font color="red"><b>abs</b></font> ...
(19:06:01) Lemmih: @. docs index <font color="red"><b>abs</b></font> ...
(19:06:33) xerox: @compose docs index <font color="red"><b>abs</b></font> ...
datenmaulwurf: but now i know what's <font color="red"><b>abs</b></font> ;) ...
(19:06:58) Heffalump: @. (docs,index) <font color="red"><b>abs</b></font> ...
(19:07:48) Cale: > map <font color="red"><b>abs</b></font> [-10..10] ... 
 Type: IMLog
MimeT: beagle/x-gaim-log
  Src: GaimLog
Score: 15.6087693674607
 Time: 1/4/2006 7:23:16 PM
    beagle:HitType = 'IMLog'
    beagle:MimeType = 'beagle/x-gaim-log'
    beagle:Source = 'GaimLog'

This doesn't have fixme:protocol set...

Comment 13 Joe Shaw 2006-08-23 15:34:01 UTC
Nor does it have any of the other required IM log properties.

Peter, can you do the following?
* shut down beagle (beagle-shutdown)
* nuke your ~/.beagle/Indexes/GaimLogIndex directory
* restart beagle with only the gaim backend enabled (BEAGLE_EXERCISE_THE_DOG=1
beagled --fg --debug --allow-backend GaimLog)
* wait for it to index all your logs; it should go quickly since the scheduler
throttling is turned off
* do the search again and wait for it to crash

Assuming it does crash, can you attach your ~/.beagle/current-* logs to the bug
so we can hopefully see if there is an error there that's preventing the log
from being detected correctly?

Comment 14 Peter Eriksen 2006-08-23 17:54:29 UTC
Created attachment 134735 [details]

Comment 15 Peter Eriksen 2006-08-23 17:57:37 UTC
Created attachment 134737 [details]

Comment 16 Joe Shaw 2006-08-23 18:10:51 UTC
Ok, this helps a lot.  Would you mind attaching the relevant log to the bug?  If
you don't want to attach it, you can send it to me at joeshaw@novell.com.

Comment 17 Joe Shaw 2006-08-23 18:11:54 UTC
(In reply to comment #16)
> Would you mind attaching the relevant log to the bug?

Er, by which I mean the IRC log. 

Comment 18 Peter Eriksen 2006-08-23 18:28:16 UTC
Created attachment 134738 [details]
Log that seems to touch the bug

Comment 19 Joe Shaw 2006-08-23 19:29:51 UTC
Created attachment 134744 [details]
Patch which fixes this and adds some sanity checks

I just checked this patch into Beagle CVS.  I'll probably do a 0.2.9 with it
this weekend or early next week.

Comment 20 Matthias Clasen 2006-08-23 23:02:52 UTC
Thanks Joe,

i've put that patch into 0.2.8-3.fc6

Note You need to log in before you can comment on or make changes to this bug.