lab313ru / ghidra_psx_ldr

Sony Playstation PSX executables loader for GHIDRA
231 stars 31 forks source link

Exception on analysis: data/psyq/[any] does not exist in module ghidra_psx_ldr #52

Closed Infrid closed 2 years ago

Infrid commented 2 years ago

I recently moved my project from ghidra 9.1.x to the latest version, I exported my data and re-imported it to a fresh ghidra 10.1 installation. After the installation I installed your beloved plugin downloaded from github.

I don't remember exactly my steps but Importing the old project brought the references of the old plugin, it wasn't a problem, I just removed the psyq lib from the data type manager, I saved and reopened the file.

At this step I clicked the Auto Analysis and I got this error

(These messages are also written to the application log file)

data/psyq/43 does not exist in module ghidra_psx_ldr
java.io.FileNotFoundException: data/psyq/43 does not exist in module ghidra_psx_ldr
  at ghidra.framework.Application.getDataSubDirectoryInModule(Application.java:415)
  at ghidra.framework.Application.getModuleDataSubDirectory(Application.java:854)
  at psx.PsxAnalyzer.added(PsxAnalyzer.java:86)
  at ghidra.app.plugin.core.analysis.AnalysisScheduler.runAnalyzer(AnalysisScheduler.java:186)
  at ghidra.app.plugin.core.analysis.AnalysisTask.applyTo(AnalysisTask.java:39)
  at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisTaskWrapper.run(AutoAnalysisManager.java:688)
  at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:788)
  at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:667)
  at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:632)
  at ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand.applyTo(AnalysisBackgroundCommand.java:58)
  at ghidra.framework.plugintool.mgr.BackgroundCommandTask.run(BackgroundCommandTask.java:102)
  at ghidra.framework.plugintool.mgr.ToolTaskManager.run(ToolTaskManager.java:319)
  at java.base/java.lang.Thread.run(Thread.java:829)

The strange thing is...the data in the plugin is there but in a different path!

The correct path is data/psyq/430 with zero! I got this error in other projects as well, seems somehow the last digit is missing, if I symlink the path 43->430 it works but is just a workaround.

I tried a couple of times to delete ghidra and start over, but still the problem is there.

I am using ghidra on fedora linux with Java 11

image

as always thank you for this amazing plugin!

lab313ru commented 2 years ago

Hi,

Thanks for the report! Yeah, at some moment I moved to the new naming system for psyq signatures. Now they support subversions like 4.3.0, for example, there are two 3.6 versions in my plugin.

So, you're right, to fix the problem, it requires renaming 43 to 430, that's it.

Infrid commented 2 years ago

awesome, this affects the latest release on github, could I just rename the dirs or should I wait a new fix/release?

lab313ru commented 2 years ago

Yeah, just rename them.

Infrid commented 2 years ago

thank you!

lab313ru commented 2 years ago

Hmm, you can also change Psyq version in the Program Information dialog., No renaming will be required.

Just add . 0

lab313ru commented 2 years ago

IMG_20220120_020841_779

In this dialog. Change 4.6 to 4.6.0, like that.

Cooljackup commented 2 years ago

Looks like you beat me to it, haha. Was just about to comment a little bit ago you can do it from the Program Information itself instead of having to rename stuff, since this issue happened to me a while back, but thank you for confirming this is the "proper" way of doing it.

Infrid commented 2 years ago

thank you all, I was able to change the psyq version from that dialog window and re-run the analysis without any trouble