Vector35 / Vector35/binaryninja-api
hellopane.py crashes when right-clicked
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Version and Platform (required):
- Binary Ninja Version: 4.3.7046-dev
- OS: all
- OS Version: all
- CPU Architecture: all
Bug Description:
python/examples/hellopane.py does not actually initialize self.m_contextMenuManager or self.m_menu and so if you right-click on the pane itself, you get:
[ScriptingProvider] Traceback (most recent call last):
[ScriptingProvider] File "C:\Users\joshwatson\AppData\Roaming\Binary Ninja\plugins\pane.py", line 112, in contextMenuEvent
[ScriptingProvider] self.m_contextMenuManager.show(self.m_menu, self.actionHandler)
[ScriptingProvider] ^^^^^^^^^^^^^^^^^^^^^^^^^
[ScriptingProvider] AttributeError: 'HelloPaneWidget' object has no attribute 'm_contextMenuManager'
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
- Install python\examples\hellopane.py in the Binary Ninja plugins directory
- Open the Hello Pane from the Plugins menu
- Right-click the Hello Pane
Expected Behavior:
A context menu or something should probably show, but at least it shouldn't throw an exception
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with python/examples/hellopane.py, especially HelloPaneWidget and its contextMenuEvent method, and compare how the context-menu members are set up before the right-click path runs. Reproduce the issue by opening the Hello Pane and right-clicking it; done means the action no longer raises the reported AttributeError and the intended context-menu behavior is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100