From: Rich Lane <rlane@club.cc.cmu.edu>
To: gauteh <eg@gaute.vetsj.com>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] Bug: Xapian exception after having polled
Date: Sat, 03 Oct 2009 14:22:34 -0400 [thread overview]
Message-ID: <1254594099-sup-719@zyrg.net> (raw)
In-Reply-To: <25727581.post@talk.nabble.com>
[-- Attachment #1: Type: text/plain, Size: 68 bytes --]
Apply the attached patch and let us know what the new backtrace is.
[-- Attachment #2: nil-msgid-asserts.patch --]
[-- Type: application/octet-stream, Size: 1254 bytes --]
commit 7ac173c5ca6ff3ec48ba776321a38fb21980a0fc
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date: Sat Oct 3 11:19:08 2009 -0700
nil msgid assertions
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index f9f87de..979597a 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -77,6 +77,8 @@ class Message
id
end
+ fail "nil msgid, header was #{header['message-id'].inspect}" unless @id
+
@from = Person.from_address(if header["from"]
header["from"]
else
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
index b59237f..d992a6c 100644
--- a/lib/sup/poll.rb
+++ b/lib/sup/poll.rb
@@ -143,6 +143,7 @@ EOS
end
m = Message.build_from_source source, offset
+ fail unless m.id
m.labels += source_labels + (source.archived? ? [] : [:inbox])
m.labels.delete :unread if m.source_marked_read? # preserve read status if possible
m.labels.each { |l| LabelManager << l }
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
index ab25ea0..91a5cc0 100644
--- a/lib/sup/xapian_index.rb
+++ b/lib/sup/xapian_index.rb
@@ -72,6 +72,7 @@ EOS
end
def build_message id
+ fail unless id
entry = synchronize { get_entry id }
return unless entry
next prev parent reply other threads:[~2009-10-03 18:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-03 10:36 gauteh
2009-10-03 18:22 ` Rich Lane [this message]
2009-10-04 10:15 ` Gaute Hope
2009-10-04 18:45 ` Rich Lane
2009-10-04 18:56 ` Gaute Hope
2009-10-04 19:03 ` Rich Lane
2009-10-04 19:20 ` Gaute Hope
2009-10-05 22:01 ` Gaute Hope
2009-10-06 10:14 ` Guillaume Quintard
2009-10-06 13:34 ` Gaute Hope
2009-10-06 14:59 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1254594099-sup-719@zyrg.net \
--to=rlane@club.cc.cmu.edu \
--cc=eg@gaute.vetsj.com \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox