Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception when clicking empty autocomplete option in interpreter window #58

Closed
sad-dev opened this issue Jul 6, 2023 · 1 comment · Fixed by #60
Closed
Labels
bug Something isn't working

Comments

@sad-dev
Copy link

sad-dev commented Jul 6, 2023

I am using a fairly recent commit of ghidra (NationalSecurityAgency/ghidra@9e83921) and the latest (b7bedaf) of Ghidrathon

Autocomplete provides no completions for me:

image

and clicking it gives me an NPE (although this might be a Ghidra issue) :

Cannot invoke "java.util.List.get(int)" because "this.list" is null
java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because "this.list" is null
	at ghidra.app.plugin.core.interpreter.CodeCompletionListSelectionModel.setSelectionInterval(CodeCompletionWindow.java:378)
	at java.desktop/javax.swing.JList.setSelectionInterval(JList.java:2104)
	at java.desktop/javax.swing.plaf.basic.BasicListUI$Handler.adjustSelection(BasicListUI.java:2931)
	at java.desktop/javax.swing.plaf.basic.BasicListUI$Handler.mousePressed(BasicListUI.java:2887)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:288)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6623)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)

Are there any possible mistakes/omissions I might have made while building/installing to look out for? It appears (#5) that autocomplete isn't a thing yet. Are there any potential problems if I run the Jython side-by-side for autocomplete and disable it before running scripts?

@mike-hunhoff
Copy link
Collaborator

@sad-dev thank you for reporting. You are correct that Ghidrathon does not yet support autocomplete, however, you have identified a bug that should be addressed.

You can run the Jython interpreter alongside Ghidrathon without needing to disable. Disabling Jython is simply a recommendation, not a requirement. Just note that when both are enabled Ghidrathon takes precendance over Jython when running scripts from the Ghidra script manager and in headless mode.

@mike-hunhoff mike-hunhoff added the bug Something isn't working label Jul 10, 2023
@mike-hunhoff mike-hunhoff changed the title No Autocomplete in the Interpreter Window? Unhandled exception when clicking empty autocomplete option in interpreter window Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants