Project

General

Profile

Actions

バグ #1561

open

関連付けの条件を空にするとIntent発動時にクラッシュする

Added by Shibafu Midorino almost 3 years ago. Updated almost 3 years ago.

Status:
分類待ち
Priority:
低め
Assignee:
-
Target version:
プラグイン名:
ブランチ:
クラッシュする:
Yes

Description

空の条件を持つ関連付け設定を追加して、実際にその設定が評価されるようなIntentを発動させると下記の例外を吐いてクラッシュします。
実行バージョンは 3c3657eb7991814b7c838b063e271b0072b541a1 です。4.1でも発生するかもしれませんが未確認です。

/Users/shibafu/git/mikutter-gtk3/plugin/intent_selector/intent_selector.rb:105:in `start_with?': no implicit conversion of nil into String (TypeError)
    from /Users/shibafu/git/mikutter-gtk3/plugin/intent_selector/intent_selector.rb:105:in `block in divide_intents'
    from /Users/shibafu/git/mikutter-gtk3/plugin/intent_selector/intent_selector.rb:104:in `select'
    from /Users/shibafu/git/mikutter-gtk3/plugin/intent_selector/intent_selector.rb:104:in `divide_intents'
    from /Users/shibafu/git/mikutter-gtk3/plugin/intent_selector/intent_selector.rb:41:in `intent_open'
    from /Users/shibafu/git/mikutter-gtk3/plugin/intent_selector/intent_selector.rb:10:in `block (2 levels) in <top (required)>'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/listener.rb:25:in `call'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:241:in `block (2 levels) in call_all_listeners'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:240:in `each'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:240:in `block in call_all_listeners'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:239:in `catch'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:239:in `call_all_listeners'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/pluggaloid-1.7.0/lib/pluggaloid/event.rb:62:in `block in call'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/delayer-1.2.1/lib/delayer/procedure.rb:26:in `run'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/delayer-1.2.1/lib/delayer/extend.rb:126:in `run_once_without_pop_reserve'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/delayer-1.2.1/lib/delayer/extend.rb:117:in `run_once'
    from /Users/shibafu/git/mikutter-gtk3/vendor/bundle/ruby/3.0.0/gems/delayer-1.2.1/lib/delayer.rb:38:in `method_missing'
    from /Users/shibafu/git/mikutter-gtk3/plugin/gtk3/mainloop.rb:23:in `block (2 levels) in mainloop'
    from /Users/shibafu/git/mikutter-gtk3/plugin/gtk3/mainloop.rb:12:in `loop'
    from /Users/shibafu/git/mikutter-gtk3/plugin/gtk3/mainloop.rb:12:in `block in mainloop'
    from /Users/shibafu/git/mikutter-gtk3/plugin/gtk3/mainloop.rb:10:in `catch'
    from /Users/shibafu/git/mikutter-gtk3/plugin/gtk3/mainloop.rb:10:in `mainloop'
    from mikutter.rb:79:in `boot!'
    from mikutter.rb:115:in `<main>'

この時設定していた内容はこんな感じです。

この時のsetting.ymlはこんな感じ。

UserConfig::intent_selector_rules:
- :model: photo
  :intent: openimg_quicklook_photo
  :str:

おそらく :str が空っぽなのがnilとしてデシリアライズされており、それによって例外が起きていると思われます。
保存時に何とかするのは既存の設定でクラッシュし続けますので、評価側を何とかしたほうが良さそうに思いました。


Files

Actions

Also available in: Atom PDF