From: William Morgan <wmorgan-sup@masanjin.net>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] Crash while in thread-view-mode
Date: Thu, 15 Oct 2009 05:46:51 -0700 [thread overview]
Message-ID: <1255610731-sup-7030@masanjin.net> (raw)
In-Reply-To: <1254955351-sup-5944@ben-laptop>
Reformatted excerpts from Ben Gamari's message of 2009-10-07:
> There must be a better way to deal with these invalid ids than
> crashing. Is there any reason this needs to be a show-stopping event?
This is probably a symptom of some thread protection issues. You're
right, there's no reason this needs to crash Sup. You could apply this:
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index 82f258b..17d5836 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -222,7 +222,7 @@ EOS
def update
@mutex.synchronize do
## let's see you do THIS in python
- @threads = @ts.threads.select { |t| !@hidden_threads[t] }.sort_by { |t| [t.date, t.first.id] }.reverse
+ @threads = @ts.threads.select { |t| !@hidden_threads[t] }.select { |t| t.first }.sort_by { |t| [t.date, t.first.id] }.reverse
@size_widgets = @threads.map { |t| size_widget_for_thread t }
@size_widget_width = @size_widgets.max_of { |w| w.display_length }
end
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2009-10-15 12:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 15:47 Ben Gamari
2009-10-06 15:53 ` Ben Gamari
2009-10-06 16:15 ` Ben Gamari
2009-10-06 16:39 ` Mark Alexander
2009-10-07 6:44 ` Rich Lane
2009-10-07 8:48 ` Guillaume Quintard
2009-10-07 9:07 ` Guillaume Quintard
[not found] ` <1254945119-sup-3401@ben-laptop>
2009-10-07 22:46 ` Ben Gamari
2009-10-15 12:46 ` William Morgan [this message]
2009-10-15 13:47 ` Guillaume Quintard
2009-10-15 15:16 ` William Morgan
2009-10-15 15:03 ` Ben Gamari
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=1255610731-sup-7030@masanjin.net \
--to=wmorgan-sup@masanjin.net \
--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