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

NullPointerException when launching Kotlin QTConsole (if jupyter is not a available in the PATH) #53

Open
jhhcs opened this issue Dec 29, 2024 · 2 comments

Comments

@jhhcs
Copy link

jhhcs commented Dec 29, 2024

I followed the manual installation steps. When attempting to launch the Kotlin QTConsole via the button in the code browser, a NullPointerException with the following stack trace is shown:

Cannot invoke "java.io.File.toPath()" because the return value of "java.io.File.getParentFile()" is null
java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because the return value of "java.io.File.getParentFile()" is null
	at GhidraJupyterKotlin.ConnectionFile.writeConfigFile(ConnectionFile.java:96)
	at GhidraJupyterKotlin.ConnectionFile.create(ConnectionFile.java:20)
	at GhidraJupyterKotlin.JupyterKotlinPlugin$1.actionPerformed(JupyterKotlinPlugin.java:87)
	at docking.DockingActionProxy.actionPerformed(DockingActionProxy.java:47)
	at docking.DockingActionPerformer.lambda$perform$0(DockingActionPerformer.java:73)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

---------------------------------------------------
Build Date: 2024-Nov-05 1643 EST
Ghidra Version: 11.2.1
Java Home: C:\Program Files\OpenJDK\jdk-22.0.2
JVM Version: Oracle Corporation 22.0.2
OS: Windows 10 10.0 amd64
Workstation: [REDACTED]

This luckily includes my OS and Ghidra version info. Cheers!

@jhhcs
Copy link
Author

jhhcs commented Dec 29, 2024

PS: I used release v1.6.13.

fmagin added a commit that referenced this issue Dec 29, 2024
@fmagin
Copy link
Contributor

fmagin commented Dec 29, 2024

This specific problem happens when the plugin fails at running the jupyter --runtime-dir command, because jupyter isn't in the PATH that Ghidra uses when spawning subprocesses. This happens when jupyter is only installed in a virtualenv and Ghidra wasn't started from within that virtualenv.

The new v1.6.14 release has somewhat clearer errors for this, but the correct fix in the future will be that the user can configure the virtual env for the jupyter tooling from within the UI

@fmagin fmagin changed the title NullPointerException when launching Kotlin QTConsole NullPointerException when launching Kotlin QTConsole (if jupyter is not a available in the PATH) Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants