[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] exception in mainline



Hi Jon,

Reformatted excerpts from Jon Dugan's message of 2009-10-28:
> i now get this when i start sup.  i'm running mainline.
> 
> --- RuntimeError from thread: load threads for thread-index-mode
> wrong id called on nil
> ./lib/sup.rb:17:in `id'
> ./lib/sup/modes/thread-index-mode.rb:225:in `update'

I posted this workaround patch earlier. I'm working on a better solution in the
meanwhile.

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

> ./lib/sup/hook.rb:122:in `sort_by'
> ./lib/sup/modes/thread-index-mode.rb:225:in `each'
> ./lib/sup/modes/thread-index-mode.rb:225:in `sort_by'
> ./lib/sup/modes/thread-index-mode.rb:225:in `update'
> ./lib/sup/modes/thread-index-mode.rb:223:in `synchronize'
> ./lib/sup/modes/thread-index-mode.rb:223:in `update'
> ./lib/sup/modes/thread-index-mode.rb:628:in `__unprotected_load_n_threads'
> ./lib/sup/thread.rb:334:in `load_n_threads'
> ./lib/sup/xapian_index.rb:151:in `each_id_by_date'
> ./lib/sup/xapian_index.rb:144:in `each_id'
> ./lib/sup/xapian_index.rb:144:in `each'
> ./lib/sup/xapian_index.rb:144:in `each_id'
> ./lib/sup/xapian_index.rb:151:in `each_id_by_date'
> ./lib/sup/thread.rb:328:in `load_n_threads'
> ./lib/sup/modes/thread-index-mode.rb:625:in `__unprotected_load_n_threads'
> (eval):12:in `load_n_threads'
> ./lib/sup/modes/thread-index-mode.rb:609:in `load_n_threads_background'
> ./lib/sup.rb:77:in `reporting_thread'
> ./lib/sup.rb:75:in `initialize'
> ./lib/sup.rb:75:in `new'
> ./lib/sup.rb:75:in `reporting_thread'
> ./lib/sup/modes/thread-index-mode.rb:608:in `load_n_threads_background'
> ./lib/sup/modes/thread-index-mode.rb:679:in `__unprotected_load_threads'
> (eval):12:in `load_threads'
> bin/sup:199
> 
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk