From: Rich Lane <rlane@club.cc.cmu.edu>
To: Gaute Hope <eg@gaute.vetsj.com>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] Bug: Xapian exception after having polled
Date: Sun, 04 Oct 2009 14:45:55 -0400 [thread overview]
Message-ID: <1254681739-sup-4089@zyrg.net> (raw)
In-Reply-To: <20091004101550.GA7330@qwerzila.bluecom.no>
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
Ok, I've attached a patch with more assertions. Also, can you try with a clean
checkout of next and see if the problem still occurs?
[-- Attachment #2: 0001-more-id-assertions.patch --]
[-- Type: application/octet-stream, Size: 1695 bytes --]
From 5046ed5e87e50c4c1b7a67031f5a914bf067c707 Mon Sep 17 00:00:00 2001
From: Rich Lane <rlane@club.cc.cmu.edu>
Date: Sun, 4 Oct 2009 11:41:27 -0700
Subject: [PATCH] more id assertions
---
lib/sup/message.rb | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index cbedb33..993ecbe 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -127,6 +127,8 @@ class Message
@source_marked_read = header["status"] == "RO"
@list_subscribe = header["list-subscribe"]
@list_unsubscribe = header["list-unsubscribe"]
+
+ fail "id nil at end of parse_header" unless @id
end
## Expected index entry format:
@@ -152,6 +154,8 @@ class Message
@source_marked_read = false
@list_subscribe = nil
@list_unsubscribe = nil
+
+ fail unless @id
end
def add_ref ref
@@ -238,7 +242,9 @@ class Message
## actually, it's also the differentiation between to/cc/bcc,
## so i will keep this.
parse_header @source.load_header(@source_info)
+ fail "id nil after parse_header" unless @id
message_to_chunks @source.load_message(@source_info)
+ fail "id nil after message_to_chunks" unless @id
rescue SourceError, SocketError => e
warn "problem getting messages from #{@source}: #{e.message}"
## we need force_to_top here otherwise this window will cover
@@ -335,6 +341,8 @@ EOS
def self.build_from_source source, source_info
m = Message.new :source => source, :source_info => source_info
m.load_from_source!
+ fail "@id nil" unless @id
+ fail "id nil" unless id
m
end
--
1.6.4.2
next prev parent reply other threads:[~2009-10-04 18:45 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
2009-10-04 10:15 ` Gaute Hope
2009-10-04 18:45 ` Rich Lane [this message]
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=1254681739-sup-4089@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