Subject: [sup-talk] two crashes on reply

From: [email-masked] (Alec Berryman)
Date: Sun, 11 Nov 2007 19:48:05 -0500

I'm new to sup and running it from svn (r689), and get not one but two
crashes while trying to reply.

I sent a message to myself, then tried to reply to it by hitting 'r'
from the message list buffer I get when I start up.  It popped up a
buffer entitled "Customized reply" with the From line highlighted.  All
the fields - From, To, Cc, Bcc, Subject - were blank.  From here I can
trigger two crashes.

First, if I press enter, my editor pops up.  If I change the file's
contents, save, and exit, I get the following:

[Sun Nov 11 19:33:29 -0500 2007] locking /home/alec/.sup/lock...
[Sun Nov 11 19:33:29 -0500 2007] loading index...
[Sun Nov 11 19:33:29 -0500 2007] loaded index of 829 messages
[Sun Nov 11 19:33:29 -0500 2007] starting curses
[Sun Nov 11 19:35:47 -0500 2007] stopped cursing
[Sun Nov 11 19:35:47 -0500 2007] oh crap, an exception
[Sun Nov 11 19:35:47 -0500 2007] unlocking /home/alec/.sup/lock...
----------------------------------------------------------------
I'm very sorry, but it seems that an error occurred in Sup.
Please accept my sincere apologies. If you don't mind, please
send the backtrace below and a brief report of the circumstances
to sup-talk at rubyforge dot orgs so that I might address this
problem. Thank you!

Sincerely,
William
----------------------------------------------------------------

The problem was: 'undefined method `size' for nil:NilClass' (error type NoMethodError)
A backtrace follows:
./lib/sup/modes/reply-mode.rb:113:in `handle_new_text': undefined method `size' for nil:NilClass (NoMethodError)
    from ./lib/sup/modes/edit-message-mode.rb:94:in `edit_message'
    from ./lib/sup/mode.rb:54:in `send'
    from ./lib/sup/mode.rb:54:in `handle_input'
    from ./lib/sup/buffer.rb:203:in `handle_input'
    from bin/sup:210

If I don't change the contents, everything's fine.

The second crash comes if I try and use the reply-mode keybindings to
change the To field by pressing 't'.  I get this:

[Sun Nov 11 19:43:36 -0500 2007] starting curses
[Sun Nov 11 19:45:07 -0500 2007] stopped cursing
[Sun Nov 11 19:45:07 -0500 2007] oh crap, an exception
[Sun Nov 11 19:45:07 -0500 2007] unlocking /home/alec/.sup/lock...
----------------------------------------------------------------
I'm very sorry, but it seems that an error occurred in Sup.
Please accept my sincere apologies. If you don't mind, please
send the backtrace below and a brief report of the circumstances
to sup-talk at rubyforge dot orgs so that I might address this
problem. Thank you!

Sincerely,
William
----------------------------------------------------------------

The problem was: 'undefined method `join' for nil:NilClass' (error type NoMethodError)
A backtrace follows:
./lib/sup/modes/edit-message-mode.rb:306:in `edit_field': undefined method `join' for nil:NilClass (NoMethodError)
    from ./lib/sup/modes/reply-mode.rb:125:in `edit_field'
    from ./lib/sup/modes/edit-message-mode.rb:73:in `edit_to'
    from ./lib/sup/mode.rb:54:in `send'
    from ./lib/sup/mode.rb:54:in `handle_input'
    from ./lib/sup/buffer.rb:203:in `handle_input'
    from bin/sup:210

I get similar errors if I try to change CC:, but not if I try to change
the subject.

I'm also not sure why sup isn't filling in the To and Subject fields.

---

From: [email-masked] (William Morgan)
Date: Mon, 12 Nov 2007 10:23:40 -0800

Hi Alec,

> the fields - From, To, Cc, Bcc, Subject - were blank.  From here I can

This is quite strange. The From field should never be blank. (And that's
what triggers the other crashes, I believe.) Can you post your
config.yaml?

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Alec Berryman)
Date: Mon, 12 Nov 2007 19:16:37 -0500

> what triggers the other crashes, I believe.) Can you post your

It's inlined below; I assume sup-config made it and haven't touched it since
except to edit my alternative address here.  When I sent the original message
to myself, the From field was filled in correctly.  Additionally, this only
seems to happen on messages I send myself; I tried to reply to another message
and it seemed to work fine.

---
:ask_for_subject: true
:confirm_no_attachments: true
:thread_by_subject: false
:confirm_top_posting: true
:edit_signature: false
:ask_for_cc: true
:accounts:
  :default:
    :sendmail: /usr/sbin/sendmail -oem -ti
    :alternates:
    - aberryman at otheraddress.com
    :name: Alec Berryman
    :signature: /home/alec/.signature
    :email: alec at thened.net
:editor: vim
:ask_for_bcc: false

---

From: [email-masked] (William Morgan)
Date: Tue, 13 Nov 2007 23:36:32 -0800

Excerpts from Alec Berryman's message of Mon Nov 12 16:16:37 -0800 2007:
> When I sent the original message to myself, the From field was filled
> in correctly.  Additionally, this only seems to happen on messages I
> send myself; I tried to reply to another message and it seemed to work
> fine.

This should be fixed in SVN now. It was a border case in determining 
what the set of possible reply-to options should be. Thanks!

---

From: [email-masked] (Alec Berryman)
Date: Wed, 14 Nov 2007 08:12:33 -0500

> what the set of possible reply-to options should be. Thanks!

I just tried it out and everything works!  Thanks!