sup-heliotrope / sup

A curses threads-with-tags style email client (mailing list: supmua@googlegroups.com)
http://sup-heliotrope.github.io
GNU General Public License v2.0
889 stars 96 forks source link

"wrong id called on nil" (RuntimeError) #583

Open IPv2 opened 3 years ago

IPv2 commented 3 years ago

wrong id called on nil - RuntimeError from thread: load threads for thread-index-mode

From exception-log.txt (filesystem paths shortened for readability):

--- RuntimeError from thread: load threads for thread-index-mode
wrong id called on nil
.../gems/sup-1.0/lib/sup.rb:20:in `id'
.../gems/sup-1.0/lib/sup/index.rb:211:in `each_message_in_thread_for'
.../gems/sup-1.0/lib/sup/thread.rb:353:in `load_thread_for_message'
.../gems/sup-1.0/lib/sup/thread.rb:345:in `block in load_n_threads'
.../gems/sup-1.0/lib/sup/index.rb:165:in `block in each_id_by_date'
.../gems/sup-1.0/lib/sup/index.rb:288:in `block in each_id'
.../gems/sup-1.0/lib/sup/index.rb:288:in `each'
.../gems/sup-1.0/lib/sup/index.rb:288:in `each_id'
.../gems/sup-1.0/lib/sup/index.rb:165:in `each_id_by_date'
.../gems/sup-1.0/lib/sup/thread.rb:340:in `load_n_threads'
.../gems/sup-1.0/lib/sup/modes/thread_index_mode.rb:686:in `load_n_threads'
(eval):12:in `load_n_threads'
.../gems/sup-1.0/lib/sup/modes/thread_index_mode.rb:670:in `block in load_n_threads_background'
.../gems/sup-1.0/lib/sup.rb:87:in `block in reporting_thread'

Sup 1.0, running from gem.

Immediately before the crash, I tried to view label "sent" (from inbox-mode, pressed "L" for "List labels", then typed "sent", enter). Sup froze showing message "Searching for threads..." (which normally is only displayed for milliseconds), and then crashed immediately when I pressed a key.

I've had similar crashes before including on earlier versions of Sup, rarely - but can't reproduce on demand.

Possible race condition?