From mboxrd@z Thu Jan 1 00:00:00 1970 From: benoit.pierre@gmail.com (=?utf-8?q?Beno=C3=AEt_PIERRE?=) Date: Tue, 18 Aug 2009 21:17:03 +0200 Subject: [sup-talk] crash when sup-syncing to xapian In-Reply-To: <1250620771-sup-1373@zyrg.net> References: <1250616603-sup-5612@ntdws12.chass.utoronto.ca> <1250619511-sup-2827@localdomain> <1250620771-sup-1373@zyrg.net> Message-ID: <1250622911-sup-2815@localdomain> Excerpts from Rich Lane's message of Tue Aug 18 20:42:13 +0200 2009: > Excerpts from Beno?t PIERRE's message of Tue Aug 18 14:20:41 -0400 2009: > > Excerpts from Ben Walton's message of Tue Aug 18 19:35:35 +0200 2009: > > > > > > I just tried to import my index to xapian and it crashed part way > > > through the import. I then discovered that I couldn't use ferret > > > either. There is something wonky with label handling, as per attached > > > exception log. I haven't had a chance to look at the code yet, but > > > I'll poke at it tonight. > > > > I think I just ran into the same problem! For now I fixed it with > > the following small patch: > > That's odd because the Xapian code passes the labels straight through > from the message to LabelManager. Try instrumenting Message#labels= to > raise an exception if any member of the set is not a Symbol. I applied the following patch: diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 965c10e..9156c02 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -1,4 +1,5 @@ require 'time' +require 'pp' module Redwood @@ -183,6 +184,7 @@ class Message def labels= l raise ArgumentError, "not a set" unless l.is_a?(Set) return if @labels == l + warn "labels=#{l.pretty_inspect}" @labels = l @dirty = true end And get this in the logs: [Tue Aug 18 21:12:39 +0200 2009] WARNING: labels=# [Tue Aug 18 21:12:39 +0200 2009] WARNING: labels=# -- A: Because it destroys the flow of conversation. Q: Why is top posting dumb? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available URL: