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

CROLinkingScript fails on Alpha Sapphire DLLBattle.cro #5

Open
tfinnegan937 opened this issue Jan 7, 2024 · 0 comments
Open

CROLinkingScript fails on Alpha Sapphire DLLBattle.cro #5

tfinnegan937 opened this issue Jan 7, 2024 · 0 comments

Comments

@tfinnegan937
Copy link
Contributor

When attempting to run the CROLinkingScript on DLLBattle in Pokemon Alpha Sapphire, the following error is returned:

Cannot invoke "ghidra.program.model.listing.Function.setThunkedFunction(ghidra.program.model.listing.Function)" because "func" is null
java.lang.NullPointerException: Cannot invoke "ghidra.program.model.listing.Function.setThunkedFunction(ghidra.program.model.listing.Function)" because "func" is null
	at com.martmists.ctr.common.CROUtilities$DefaultImpls.createReferenceTo(CROUtilities.kt:161)
	at com.martmists.ctr.script.CROLinkingScriptImpl.createReferenceTo(CROLinkingScriptImpl.kt:10)
	at com.martmists.ctr.script.CROLinkingScriptImpl.run(CROLinkingScriptImpl.kt:73)
	at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:403)
	at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:258)
	at ghidra.app.script.GhidraScript.execute(GhidraScript.java:236)
	at ghidra.app.plugin.core.script.RunScriptTask.run(RunScriptTask.java:47)
	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:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

---------------------------------------------------
Build Date: 2023-Dec-22 0936 EST
Ghidra Version: 11.0
Java Home: C:\Program Files\OpenLogic\jdk-17.0.9.9-hotspot
JVM Version: OpenLogic 17.0.9
OS: Windows 11 10.0 amd64
Workstation: TIM-PC

Steps to Reproduce:

  1. Analyze the file
  2. Run the CROStructPlacementScript to apply the table headers (Are these supposed to be getting applied automatically?)
  3. Run the CROLinkingScript
  4. The error is generated

I am going to try and debug this, but @Martmists-GH is this the correct way to use the provided scripts?

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

1 participant