From: Alex Shulgin <alex.shulgin@gmail.com>
To: sup-talk <sup-talk@rubyforge.org>
Subject: [sup-talk] Sup crashes when loading a message
Date: Fri, 23 Dec 2011 17:31:08 +0200 [thread overview]
Message-ID: <CAM-UEKQWwyGzHcJ=QtA+8yYYi2cipHACB+TB+_3aSp0VfPzohg@mail.gmail.com> (raw)
Got this crash today:
--- NoMethodError from thread: periodic poll
undefined method `downcase' for nil:NilClass
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/rmail-1.0.0/lib/rmail/header.rb:537:in
`content_type'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/message.rb:427:in
`message_to_chunks'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/message.rb:427:in
`map'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/message.rb:427:in
`message_to_chunks'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/message.rb:259:in
`load_from_source!'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/message.rb:328:in
`build_from_source'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:158:in
`poll_from'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/mbox.rb:143:in
`poll'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:155:in
`poll_from'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:113:in
`do_poll'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:103:in
`each'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:103:in
`do_poll'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:102:in
`synchronize'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:102:in
`do_poll'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/util.rb:609:in
`send'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/util.rb:609:in
`method_missing'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/modes/poll-mode.rb:15:in
`poll'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:49:in
`poll_with_sources'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:68:in `poll'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:86:in
`start'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup.rb:78:in
`reporting_thread'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup.rb:76:in
`initialize'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup.rb:76:in `new'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup.rb:76:in
`reporting_thread'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/poll.rb:83:in
`start'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/util.rb:609:in
`send'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/lib/sup/util.rb:609:in
`method_missing'
/home/ash/.rvm/gems/ruby-1.8.7-p352/gems/sup-0.12.1/bin/sup:222
/home/ash/.rvm/gems/ruby-1.8.7-p352/bin/sup:19:in `load'
/home/ash/.rvm/gems/ruby-1.8.7-p352/bin/sup:19
Seems like rmail doesn't really like an empty "Content-Type: " header:
rmail/header.rb:
def content_type(default = nil)
if value = self['content-type']
value.strip.split(/\s*;\s*/)[0].downcase # <== crashes on value=""
else
if block_given?
yield
else
default
end
end
end
Adding (... || "") before downcase seems to help this crash.
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
reply other threads:[~2011-12-23 15:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAM-UEKQWwyGzHcJ=QtA+8yYYi2cipHACB+TB+_3aSp0VfPzohg@mail.gmail.com' \
--to=alex.shulgin@gmail.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