Vector35 / snippets

plugin for storing and using snippets of useful Binja script
MIT License
22 stars 9 forks source link

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

Closed yrp604 closed 4 years ago

yrp604 commented 4 years ago

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:

psifertex commented 4 years ago

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.

psifertex commented 4 years ago

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?

yrp604 commented 4 years ago

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.

psifertex commented 4 years ago

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