{"record":{"id":"633c7e451d6a30fb","repo":"NationalSecurityAgency/ghidra","slug":"at-file-pdbname-errormessage","errorCode":null,"errorMessage":"At file '{pdbName}':\n{errorMessage}","messagePattern":"At file '(.+?)':\n(.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/Base/ghidra_scripts/CreatePdbXmlFilesScript.java","lineNumber":150,"sourceCode":"\t\t\tnew BufferedReader(new InputStreamReader(currentProcess.getErrorStream()));\n\t\tString line = null;\n\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tstrBuilder.append(line);\n\t\t\tstrBuilder.append(System.getProperty(\"line.separator\"));\n\t\t}\n\n\t\treader.close();\n\n\t\tint exitValue = currentProcess.waitFor();\n\t\tString errorMessage = strBuilder.toString();\n\n\t\tif (errorMessage.length() > 0) {\n\t\t\tif (createdFile.isFile()) {\n\t\t\t\tcreatedFile.delete();\n\t\t\t}\n\n\t\t\tthrow new IOException(\"At file '\" + pdbName + \"':\\n\" + errorMessage);\n\t\t}\n\n\t\tif (exitValue != 0) {\n\t\t\tif (createdFile.isFile()) {\n\t\t\t\tcreatedFile.delete();\n\t\t\t}\n\n\t\t\tthrow new IOException(\n\t\t\t\t\"At file '\" + pdbName + \"':\\nAbnormal termination of 'pdb.exe' process.\");\n\t\t}\n\t}\n\n\tprivate void getPDBFiles(File parentDir, List<File> foundFiles) {\n\n\t\tfor (File childFile : parentDir.listFiles()) {\n\t\t\tif (childFile.isDirectory()) {\n\t\t\t\tgetPDBFiles(childFile, foundFiles);\n\t\t\t}","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/Base/ghidra_scripts/CreatePdbXmlFilesScript.java#L132-L168","documentation":"Thrown by CreatePdbXmlFilesScript.runPdbExe after invoking the external 'pdb.exe' helper. The script reads pdb.exe's stderr into a StringBuilder; if that buffer is non-empty, the partially-created .pdb.xml file is deleted and an IOException wrapping the stderr is thrown. It indicates the PDB parser emitted a diagnostic - typically a malformed, corrupt, or unsupported PDB.","triggerScenarios":"Running CreatePdbXmlFilesScript on Windows against a .pdb file that pdb.exe cannot parse. Any non-empty stderr output from pdb.exe triggers it, even if the exit code is 0. Also triggered by locked/inaccessible PDB files or unsupported PDB format versions.","commonSituations":"Processing a corrupt or truncated .pdb downloaded from a symbol server. PDB produced by an unsupported toolchain/version. File-permission or AV-lock issues on Windows preventing pdb.exe from reading the file.","solutions":["Re-download or regenerate the offending .pdb (the message names it).","Check that the .pdb is not locked by another process (debugger, AV) on Windows.","Verify the PDB format matches the pdb.exe version shipped with your Ghidra build.","Run pdb.exe manually on the file to see the full stderr and diagnose the parse error."],"exampleFix":"// before\nrunPdbExe(pdbExeLocation, pdbParentDir, pdbName, currentFilePath);\n\n// after - run pdb.exe manually to inspect stderr, then retry with a fresh pdb\n//   pdb.exe <file>.pdb\n// if corrupt: re-export symbols from the matching binary","handlingStrategy":"try-catch","validationCode":"// Verify the file is readable and well-formed before invoking pdb.exe\nFile pdb = new File(path);\nif (!pdb.exists() || pdb.length() == 0) {\n    throw new IOException(\"PDB missing or empty: \" + path);\n}","typeGuard":null,"tryCatchPattern":"try {\n    runPdbExe(pdbExeLocation, parent, name, path);\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"At file '\")) {\n        // stderr output - inspect the named file, re-fetch from symbol server\n        popup(e.getMessage());\n    } else throw e;\n}","preventionTips":["Run pdb.exe manually on a suspect PDB to view the full stderr.","Re-fetch PDBs from the symbol server if a parse error suggests corruption.","Ensure the file is not locked by a debugger or AV."],"tags":["pdb","windows","external-process","script"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}