Project

General

Profile

バグ #1310

通知が来た時にクラッシュすることがある

Added by ncaq net 4 months ago. Updated 4 months ago.

Status:
終了
Priority:
通常
Assignee:
Target version:
プラグイン名:
ブランチ:
topic/1310-fix-crash-in-notify
クラッシュする:
Yes

Description

エラーメッセージ

NoMethodError undefined method `[]' for nil:NilClass
{MIKUTTER_DIR}/core/plugin/notify/notify.rb:59:in `map'
{MIKUTTER_DIR}/core/plugin/notify/notify.rb:59:in `block (2 levels) in <top (required)>'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/listener.rb:25:in `call'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:97:in `block (2 levels) in call_all_listeners'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `each'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `block in call_all_listeners'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `catch'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `call_all_listeners'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:39:in `block in call'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/procedure.rb:24:in `run'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:58:in `run_once'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:30:in `run'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer.rb:43:in `method_missing'
{MIKUTTER_DIR}/core/plugin/gtk/delayer.rb:10:in `block in boot'
{MIKUTTER_DIR}/core/plugin/gtk/mainloop.rb:10:in `main'
{MIKUTTER_DIR}/core/plugin/gtk/mainloop.rb:10:in `mainloop'
{MIKUTTER_DIR}/mikutter.rb:69:in `boot!'
{MIKUTTER_DIR}/mikutter.rb:105:in `<main>'

簡単なバグなのでパッチを作りました.


Files

0001-fixed-nil.patch (3.29 KB) 0001-fixed-nil.patch パッチ ncaq net, 2019-01-10 13:47

再現手順

通知が来るのを待つ

Associated revisions

Revision ba6f5b6b (diff)
Added by ncaq net 4 months ago

fixed: 添字アクセスの前にnilチェックを入れる

以下のようなエラーが出てクラッシュする時がある.

~~~
NoMethodError undefined method `[]' for nil:NilClass {MIKUTTER_DIR}/core/plugin/notify/notify.rb:59:in `map' {MIKUTTER_DIR}/core/plugin/notify/notify.rb:59:in `block (2 levels) in <top (required)>'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/listener.rb:25:in `call'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:97:in `block (2 levels) in call_all_listeners'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `each'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:96:in `block in call_all_listeners'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `catch'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:95:in `call_all_listeners'
/usr/lib64/ruby/gems/2.4.0/gems/pluggaloid-1.1.1/lib/pluggaloid/event.rb:39:in `block in call'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/procedure.rb:24:in `run'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:58:in `run_once'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer/extend.rb:30:in `run'
/usr/lib64/ruby/gems/2.4.0/gems/delayer-0.0.2/lib/delayer.rb:43:in `method_missing' {MIKUTTER_DIR}/core/plugin/gtk/delayer.rb:10:in `block in boot' {MIKUTTER_DIR}/core/plugin/gtk/mainloop.rb:10:in `main' {MIKUTTER_DIR}/core/plugin/gtk/mainloop.rb:10:in `mainloop' {MIKUTTER_DIR}/mikutter.rb:69:in `boot!' {MIKUTTER_DIR}/mikutter.rb:105:in `<main>'
~~~

History

#1

Updated by toshi_a 初音 4 months ago

  • Status changed from 分類待ち to パッチ適用待ち
  • Assignee set to toshi_a 初音

なるほど、たしかにこれは

#2

Updated by toshi_a 初音 4 months ago

  • Status changed from パッチ適用待ち to レビュー待ち
  • Assignee changed from toshi_a 初音 to ncaq net
  • ブランチ set to topic/1310-fix-crash-in-notify

pushしました。何も替えてませんが、一応確認お願いします

#3

Updated by ncaq net 4 months ago

  • Status changed from レビュー待ち to マージ待ち

確認しました

#4

Updated by toshi_a 初音 4 months ago

  • Status changed from マージ待ち to 終了

merged.

Also available in: Atom PDF