Skip to content

Osgi errors when script folders contain unreadable subfolders #8466

@sad-dev

Description

@sad-dev

Describe the bug

Java scripts e.g. HelloWorldScript.java cannot be run and the log has errors like

ERROR,(GhidraSourceBundle) Exception while searching for file system discrepancies  java.lang.NullPointerException: Cannot read the array length because \<local8>\ is null
   at ghidra.app.plugin.core.osgi.GhidraSourceBundle.visitDiscrepancies(GhidraSourceBundle.java:702)
   at ghidra.app.plugin.core.osgi.GhidraSourceBundle.updateFromFilesystem(GhidraSourceBundle.java:388)
   at ghidra.app.plugin.core.osgi.GhidraSourceBundle.build(GhidraSourceBundle.java:569)
   at ghidra.app.plugin.core.osgi.BundleHost.activateInStages(BundleHost.java:754)
   at ghidra.app.plugin.core.osgi.BundleHost.lambda$restoreManagedBundleState$6(BundleHost.java:895)
   at ghidra.util.task.TaskLauncher$2.run(TaskLauncher.java:115)
   at ghidra.util.task.Task.monitoredRun(Task.java:134)
   at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
   at java.base/java.lang.Thread.run(Thread.java:1583)

Appears likely to be an unexpected directory structure but I am not sure how to troubleshoot this

Environment (please complete the following information):

  • OS: NixOS
  • Java Version: openjdk-21
  • Ghidra Version: 11.4.1 official release

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions