Troubleshooting
Symptom first, cause underneath, fix last. The entries marked (lab) happened during this guide's own build and are recorded as they occurred.
| Symptom | Likely cause and fix |
|---|---|
| The launcher refuses to start, or reports it cannot find a supported Java | JDK missing or the wrong version. Ghidra 12.2 requires a 64-bit JDK 25; the build machine's JDK 21 was not accepted as a substitute. Install the JDK your release's GettingStarted names and point JAVA_HOME at it, then launch again. A JDK that is merely newer is not automatically right either — match the document. |
Headless ends with Script not found: <name> <arg> (lab) |
The script and its argument were quoted as one word. -postScript "SurveyProgram.java check_code" sends the whole lump as the script's name. Give the name and each argument as separate words: -postScript SurveyProgram.java check_code. |
| Headless runs a script, but not your script — it rejects your arguments or behaves like someone else's tool (lab) | A name collision with a bundled script. Headless resolves scripts by name across all script folders; Ghidra's own ListFunctions.java shadowed the guide's first draft of the same name. Check the log's SCRIPT: line for the file that actually ran, then rename yours to something nobody ships. |
| Headless says your script is not found, though the file is right there (lab) | The -scriptPath didn't take. In the lab's 12.2 runs, repeating -scriptPath searched only the last folder, and one flag carrying two colon-joined folders was ignored. Use a single -scriptPath naming one folder that holds all the job's scripts. |
The Listing is a sea of FUN_ names |
The binary is stripped (or nearly). Expected, not an error: analysis found the functions; only the names are gone. file <binary> confirms. Chapter 7 is the working method — rename from evidence as you read. Library code may still be named by the Function ID analyser. |
| Disassembly looks like confident nonsense — impossible instructions, mid-instruction starts | Wrong language: processor, endianness, or width. A raw import guessed badly, or bytes were disassembled from the wrong offset. Re-import with the language named explicitly (-processor headlessly, or the import dialog's language picker in the window (documented)), and distrust everything downstream of the first bad instruction. |
| A raw binary imports but contains no code at all | No entry point, so analysis never started. Raw formats don't say where execution begins. Disassemble from a known or likely offset (a reset vector, the load address — the lab script did exactly this at 0x8000), create the function, and let analysis follow the flow. |
| The decompiler shows a spinning failure, or empty/garbled C for one function | The function's data is incomplete or its boundaries are wrong. Check the Listing first: if the instructions are wrong, the C cannot be right (fix the language or the boundaries, re-analyse). If the Listing is sound, the Stack and Decompiler Parameter ID analysers (chapter 4 (documented)) are the usual missing inputs; re-running auto-analysis with them on is the standard remedy. |
| Analysis takes forever, or the machine runs out of memory | Scale. Big binaries are genuinely expensive (chapter 14). Headless on a machine with more RAM is one answer; raising the heap in support/launch.properties is the documented knob; analysing a first pass with the heaviest analysers off, then enabling them per-program, is the working compromise. Don't mistake a long analysis for a hung one — the log keeps moving. |
| Ghidra says the project is locked or already open | Another Ghidra has it, or one died holding it. Close the other instance first. If none is running, a previous crash left the project's lock behind; Ghidra offers to open the project anyway or you can remove the stale lock it names — take the offer, and let it check the project, rather than deleting files blindly (documented). |
| You renamed and commented for an hour and it's all gone | The program wasn't saved. Analysis results and your annotations live in the project; closing the program offers to save, and headless saves at the end of a successful run (watch for REPORT: Save succeeded). Answer the prompt — and keep the lab notebook of chapter 8 as the insurance it is. |
| The gatekeeper transcripts don't match your screen | Your Ghidra is a different release. Addresses and decompiler phrasing drift between versions; the specimen's logic doesn't. Trust the shape — call, compare against 0x191b2, branch — over the exact furniture, and rebuild the specimen from examples/gatekeeper.c if you want byte-identical evidence. |
Check: most Ghidra mysteries dissolve into one of four questions — is the JDK the one this release asked for, is the language right, was the binary stripped, and did the thing I asked to run actually run? The lab hit three of the four while writing this guide; the table is the shape of its notebook.