lucasg/Dependencies · warning
[x] Exception : {0:s}
Error message
[x] Exception : {0:s} What it means
Companion line to error 0, printed immediately after it by PEManifest.PrettyPrint() (Program.cs:141). It dumps the private Exception field, which the constructor populated with e.ToString() from the XmlException raised by SxsManifest.ParseSxsManifest (Program.cs:122). It gives the exact parser location (line/column) of the malformed manifest. Same warning semantics: non-fatal, stderr only.
Source
Thrown at Dependencies/Program.cs:141
}
}
}
public void PrettyPrint()
{
Console.WriteLine("[-] Manifest for file : {0}", Application.Filepath);
if (Manifest.Length == 0)
{
Console.WriteLine("[x] No embedded pe manifest for file {0:s}", Application.Filepath);
return;
}
if (Exception.Length != 0)
{
Console.Error.WriteLine("[x] \"Malformed\" pe manifest for file {0:s} : {1:s}", Application.Filepath, Manifest);
Console.Error.WriteLine("[x] Exception : {0:s}", Exception);
return;
}
Console.WriteLine(XmlManifest);
}
public string Manifest;
public XDocument XmlManifest;
// stays private in order not end up in the json output
private PE Application;
private string Exception;
}
class PEImports : IPrettyPrintable
{
public PEImports(PE _Application)
{View on GitHub (pinned to 1997a40000)
Solutions
- Use the XmlException line/column reported in this output to pinpoint the exact byte that broke parsing.
- Fix the manifest at the source and rebuild, then re-run `-manifest` to confirm XmlManifest is produced.
- If unfixable, treat the PE as manifest-less and avoid code paths that dereference XmlManifest (which will be null).
Defensive patterns
Strategy: validation
Validate before calling
var pm = new PEManifest(pe);
bool manifestOk = string.IsNullOrEmpty(pm.Manifest) || pm.XmlManifest != null;
if (!manifestOk)
{
// XmlManifest is null; the constructor stored the XmlException details privately.
// Surface your own diagnostic instead of relying on PrettyPrint's stderr lines.
Console.Error.WriteLine($"Manifest parse failed for {pe.Filepath}; raw manifest ignored.");
} Prevention
- Treat the private Exception field as the source of truth for parse failure: if XmlManifest is null and Manifest is non-empty, parsing failed.
- Do not call PrettyPrint in automated pipelines if stderr noise is undesirable; inspect XmlManifest directly.
When it happens
Trigger: Any invocation that reaches PEManifest.PrettyPrint() with Exception.Length != 0, i.e. the manifest resource was present but failed XML parsing during construction (Program.cs:117-123).
Common situations: Same as error 0: corrupted/truncated/encoding-mangled RT_MANIFEST resources; manifests produced by buggy build tooling or modified post-link.
Related errors
- [x] "Malformed" pe manifest for file {0:s} : {1:s}
- - "{0:s}"
- [!] Unhandled exception occured while processing "{1:s}"
- Stacktrace: {0:s}
- Modules backtrace:
AI-assisted analysis of lucasg/Dependencies@1997a40000 (2026-08-13).
Data as JSON: /api/errors/ae5ad6079222b57e.
Report an issue: GitHub.