FS#75233 - [ghidra] fails to start due java issue

Attached to Project: Community Packages
Opened by Danny Schneider (schnedan) - Monday, 04 July 2022, 07:33 GMT
Last edited by Toolybird (Toolybird) - Monday, 08 August 2022, 07:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: ghidra fails to start due java issue

starting ghidra gives:
ghidra
Exited with error. Run in foreground (fg) mode for more details.

running in debug mode:
/opt/ghidra/support/ghidraDebug
Listening for transport dt_socket at address: 18001
openjdk version "18.0.1.1" 2022-04-22
OpenJDK Runtime Environment (build 18.0.1.1+2)
OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode)
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "<local3>" is null
at utility.module.ModuleUtilities.findModuleRootDirectoriesHelper(ModuleUtilities.java:89)
at utility.module.ModuleUtilities.findModuleRootDirectoriesHelper(ModuleUtilities.java:97)
at utility.module.ModuleUtilities.findModuleRootDirectoriesHelper(ModuleUtilities.java:97)
at utility.module.ModuleUtilities.findModuleRootDirectories(ModuleUtilities.java:81)
at utility.module.ModuleUtilities.findModuleRootDirectories(ModuleUtilities.java:114)
at ghidra.GhidraApplicationLayout.findGhidraModules(GhidraApplicationLayout.java:155)
at ghidra.GhidraApplicationLayout.<init>(GhidraApplicationLayout.java:70)
at ghidra.GhidraLauncher.initializeGhidraEnvironment(GhidraLauncher.java:99)
at ghidra.GhidraLauncher.launch(GhidraLauncher.java:48)
at ghidra.Ghidra.main(Ghidra.java:47)

Additional info:
pacman -Qi ghidra
Name : ghidra
Version : 10.1.4-1
Beschreibung : Software reverse engineering framework
Architektur : x86_64
URL : https://ghidra-sre.org/
Lizenzen : Apache
Gruppen : Nichts
Stellt bereit : Nichts
Hängt ab von : java-environment>=11 bash
Optionale Abhängigkeiten : python2: Python feature [Installiert]
pam: GhidraServer support [Installiert]
Benötigt von : ghidra-extension-ghidra-cpp-class-analyzer-git
Optional für : Nichts
In Konflikt mit : Nichts
Ersetzt : Nichts
Installationsgröße : 916,07 MiB
Packer : Frederik Schwan <freswa@archlinux.org>
Erstellt am : Sa 21 Mai 2022 00:26:54 CEST
Installiert am : Do 30 Jun 2022 15:38:48 CEST
Installationsgrund : Ausdrücklich installiert
Installations-Skript : Nein
Verifiziert durch : Signatur

archlinux-java status
Available Java environments:
java-18-openjdk (default)


Steps to reproduce:
try to start ghidra
from gui - "nothing" happens
from cli - error message(s) as stated above
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 08 August 2022, 07:27 GMT
Reason for closing:  Works for me
Comment by Toolybird (Toolybird) - Thursday, 21 July 2022, 07:38 GMT
Is this still happening? Can you try an earlier openjdk version (17 or 11)? Java has seen some updates recently so maybe the problem is resolved? Please let us know.
Comment by Danny Schneider (schnedan) - Thursday, 21 July 2022, 17:33 GMT
I have two computers or better my private PC and an Arch VM at work.
Both have installed the same versions (ghidra + jdk).
It does not work in the VM (but has in the past), but works on my PC.

but I will try if I find some time at work...
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:50 GMT
It tried jdk17 + jdk11
--> as expected with no difference (why there should be any if it works with jdk18 on on PC and doesn't on another?)

I addes 2 files I generated with strace while jdk 11 was set globally
strace ghidra > ghidra_strace.txt 2>&1
strace ghidra -f > ghidra_strace_subprocesses.txt 2>&1

You can see the error in the first file and also that jdk 11 is used in the second one...
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:51 GMT
sorry: i used strace -ff in the second run, not -f
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:53 GMT
sorry: second file to large ... splited it
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:54 GMT
god this system sucks... another attempt to add the file
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:55 GMT
cmrficrnhj rqiornaepurn eoprun eor
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:56 GMT
OK, the system is not accepting my file... even if they are now all smaller than 2M... giving up
Comment by Danny Schneider (schnedan) - Monday, 08 August 2022, 06:57 GMT
if you want the files, provide an Mailadress please
Comment by Toolybird (Toolybird) - Monday, 08 August 2022, 07:26 GMT
There are no other reports about this, so if it works on your PC but not the VM, it's fairly safe to assume there is something mysterious about the VM it doesn't like. Seeing as there is no identifiable or actionable bug here (yet), probably best at this stage if you take it to the support channels (forum/IRC/etc) where others might be able to assist.

Loading...