* [sup-talk] sup crashing after sending mail
[not found] <CBBB81512D1FE445823400465FCCFFF2D8AA45@sluga.fer.hr>
@ 2009-08-05 15:29 ` William Morgan
2009-08-05 23:24 ` Igor Brkic
0 siblings, 1 reply; 5+ messages in thread
From: William Morgan @ 2009-08-05 15:29 UTC (permalink / raw)
Hi Igor,
Reformatted excerpts from Igor Brkic's message of 2009-08-02:
> For mail sending I use sSMTP and my ISP's SMTP server. When I try to
> send mail from sup, after pressing y on keyboard, mail gets sent but
> sup crashes (exception-log_0.txt in attachment).
A few people have reported this and I'm trying to track it down. Would
you mind applying the following patch, and then running:
sup-sync -a sup://sent
Hopefully that will generate a little debugging output I can use. Thanks!
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 5372fc7..fc9af59 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -92,11 +92,11 @@ class Message
begin
Time.parse date
rescue ArgumentError => e
- #Redwood::log "faking mangled date header for #{@id} (orig #{header['date']
+ Redwood::log "faking mangled date header for #{@id} (orig #{header['date'].
Time.now
end
else
- #Redwood::log "faking non-existent date header for #{@id}"
+ Redwood::log "faking non-existent date header for #{@id}"
Time.now
end
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
index 354bd21..365f828 100644
--- a/lib/sup/poll.rb
+++ b/lib/sup/poll.rb
@@ -148,7 +148,9 @@ EOS
labels = labels + (source.archived? ? [] : [:inbox])
m = Message.new :source => source, :source_info => offset, :labels => label
+ Redwood::log "XX before load: #{m.date.inspect}"
m.load_from_source!
+ Redwood::log "XX after load: #{m.date.inspect}"
if m.source_marked_read?
m.remove_label :unread
@@ -157,7 +159,9 @@ EOS
docid, entry = Index.load_entry_for_id m.id
HookManager.run "before-add-message", :message => m
+ Redwood::log "XX after add-message: #{m.date.inspect}"
m = yield(m, offset, entry) or next if block_given?
+ Redwood::log "XX after yield: #{m.date.inspect}"
times = Index.sync_message m, false, docid, entry, opts
UpdateManager.relay self, :added, m unless entry
end
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] sup crashing after sending mail
2009-08-05 15:29 ` [sup-talk] sup crashing after sending mail William Morgan
@ 2009-08-05 23:24 ` Igor Brkic
2009-08-06 14:40 ` William Morgan
0 siblings, 1 reply; 5+ messages in thread
From: Igor Brkic @ 2009-08-05 23:24 UTC (permalink / raw)
Excerpts from William Morgan's message of Sri Kol 05 17:29:27 +0200 2009:
> A few people have reported this and I'm trying to track it down. Would
> you mind applying the following patch, and then running:
> sup-sync -a sup://sent
>
> Hopefully that will generate a little debugging output I can use. Thanks!
I (partially) solved/hacked the problem. The problem was (I think) in wrong
set locale and Sup not being able to recognize and compare sending date
(which had croatian tags for month and day of the week) and Time.now (which
was whole in english/universal format).
I solved the problem by commenting out the "Time.parse time, 0" (line 15 in
file lib/sup/mbox.rb).
It's not perfect solution (if that line should be commented out, it would
be :D), but for me it works for now (I'm writing this mail from it).
Cheers!
Igor Brkic
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] sup crashing after sending mail
2009-08-05 23:24 ` Igor Brkic
@ 2009-08-06 14:40 ` William Morgan
2009-08-06 16:57 ` Igor Brkic
0 siblings, 1 reply; 5+ messages in thread
From: William Morgan @ 2009-08-06 14:40 UTC (permalink / raw)
Reformatted excerpts from Igor Brkic's message of 2009-08-05:
> I solved the problem by commenting out the "Time.parse time, 0" (line
> 15 in file lib/sup/mbox.rb).
I'm glad that works, but I have a hard time understanding why.
That line is for parsing the mbox "From " separator line (which has a
date on it). It has nothing to do with the date field in the message,
which is what isn't being set (and thus raising the exception).
If the date parsing on that line is screwed up, then I would except to
see an out-of-sync error raised by Sup, since it would be expecting an
mbox "From " separator line and wouldn't detect the line as such.
If you feel like it, send me a small mbox file (possible your
~/.sup/sent.mbox after being censored) and I can take a look.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] sup crashing after sending mail
2009-08-06 14:40 ` William Morgan
@ 2009-08-06 16:57 ` Igor Brkic
[not found] ` <1249579173-sup-573@xps>
0 siblings, 1 reply; 5+ messages in thread
From: Igor Brkic @ 2009-08-06 16:57 UTC (permalink / raw)
Excerpts from William Morgan's message of ?et Kol 06 16:40:08 +0200 2009:
>
> If you feel like it, send me a small mbox file (possible your
> ~/.sup/sent.mbox after being censored) and I can take a look.
This is weird... For the last hour and a half I've been trying to
reproduce the error I was having - I uncommented the line in mbox.rb,
returned locale settings to previous state - but everything is working
flawless. Whatever I make, it won't crash. I'll keep trying, though :)
I'm afraid I can't send you the mbox file that is causing sup to crash
because I deleted all logs and sent.mbox files the moment all started
to work.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] sup crashing after sending mail
[not found] ` <1249579173-sup-573@xps>
@ 2009-08-06 17:45 ` William Morgan
0 siblings, 0 replies; 5+ messages in thread
From: William Morgan @ 2009-08-06 17:45 UTC (permalink / raw)
Reformatted excerpts from Igor Brkic's message of 2009-08-06:
> I attached output of "sup-sync -a sup://sent" with patch you sent me
> applyed (sync-log.txt).
Awesome. This looks very juicy. Thanks!
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-06 17:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CBBB81512D1FE445823400465FCCFFF2D8AA45@sluga.fer.hr>
2009-08-05 15:29 ` [sup-talk] sup crashing after sending mail William Morgan
2009-08-05 23:24 ` Igor Brkic
2009-08-06 14:40 ` William Morgan
2009-08-06 16:57 ` Igor Brkic
[not found] ` <1249579173-sup-573@xps>
2009-08-06 17:45 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox