Vector35/snippets

Snippet triggered with no context and no view frame. This should not happen.

Closed this issue · 4 comments

2144-dev, Window/python 3.8

If the python console is in focus, running any snippet will error:

Traceback (most recent call last):
  File "C:\Users\x\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_snippets\__init__.py", line 114, in <lambda>
    return lambda context: executeSnippet(code, context)
  File "C:\Users\x\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_snippets\__init__.py", line 62, in executeSnippet
    dock = DockHandler.getActiveDockHandler()
NameError: name 'DockHandler' is not defined

Repro:

  • Open any bv
  • Select the python console and enter anything, e.g. 1 == 1
  • Click the snippet menu and run any snippet
  • Error should show up in log window

Already fixed in the source branch... sorta. Which is to say you won't get this error but will get a different one and it's not fixable in the plugin. It's a bug is in the action system that can't be fixed in the plugin. I'm going to rename for what the new behavior is since it'll undoubtably show up again for others.

Actually, there's a chance this might be fixed for real I just pushed another build (1.3) to the plugin manager. Mind giving it a try and letting me know if you run into it again?

Yeah, my specific repro steps are broken now, seems fixed 👍

Related to updating plugins, it might make sense to notify users that plugin updates are available similar to how binja updates are signaled? Right now someone would only pick up on this update if they went to the plugin list after they have it installed.

Agreed, we've got a list of features for a plugin-manager overhaul and that's a good one to add to the list.