From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.117.16 with SMTP id p16cs609356agc; Thu, 15 Oct 2009 05:47:06 -0700 (PDT) Received: by 10.224.81.195 with SMTP id y3mr11286qak.82.1255610825310; Thu, 15 Oct 2009 05:47:05 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 1si131184qyk.70.2009.10.15.05.47.05; Thu, 15 Oct 2009 05:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id F39F413C896A; Thu, 15 Oct 2009 08:47:04 -0400 (EDT) Received: from entry.masanjin.net (masanjin.net [209.20.72.13]) by rubyforge.org (Postfix) with ESMTP id E962A1858292 for ; Thu, 15 Oct 2009 08:46:51 -0400 (EDT) Received: from w by entry.masanjin.net with local (Exim 4.69) (envelope-from ) id 1MyPjH-0000Dk-Bk for sup-talk@rubyforge.org; Thu, 15 Oct 2009 05:46:51 -0700 From: William Morgan To: sup-talk In-reply-to: <1254955351-sup-5944@ben-laptop> References: <1254844050-sup-4148@ben-laptop> <1254844166-sup-1028@ben-laptop> <1254845543-sup-9458@ben-laptop> <1254896214-sup-5969@zyrg.net> <1e5fdab70910070148s31a8a371u81182a13e72bea4c@mail.gmail.com> <1254945119-sup-3401@ben-laptop> <1254955351-sup-5944@ben-laptop> Date: Thu, 15 Oct 2009 05:46:51 -0700 Message-Id: <1255610731-sup-7030@masanjin.net> User-Agent: Sup/git Subject: Re: [sup-talk] Crash while in thread-view-mode X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org 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 _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk