lucasg/Dependencies · error

Stacktrace: {0:s}

Error message

Stacktrace:
{0:s}

What it means

Printed by SafeExecutor<T>'s catch(Exception ex) immediately after the generic failure banner (Program.cs:552). It dumps ex.StackTrace to stderr so the developer can locate which method inside LoadPe()/ResolveDependencies() threw. It is purely diagnostic; the exception is then wrapped in RethrownException and re-thrown.

Source

Thrown at Dependencies/Program.cs:552

        {
            SafeExecutor(() => { action(); return 0; });
        }

        private T SafeExecutor<T>(Func<T> action)
        {
            try
            {
                return action();
            }
            catch (RethrownException rex)
            {
                Console.Error.WriteLine(" - \"{0:s}\"", Filepath);
                throw rex;
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("[!] Unhandled exception occured while processing \"{1:s}\"", RecursionLevel, Filepath);
                Console.Error.WriteLine("Stacktrace:\n{0:s}\n", ex.StackTrace);
                Console.Error.WriteLine("Modules backtrace:");
                throw new RethrownException(ex);
            }
            finally
            {
                //
                
            }

            // return default(T);
        }

        // Json exportable
		public string ModuleName;
        public string Filepath;
        public ModuleSearchStrategy SearchStrategy;
        public List<PeDependencyItem> Dependencies
        {

View on GitHub (pinned to 1997a40000)

Solutions

  1. Use the top frame of this stack trace to identify the failing method, then fix or guard that call.
  2. If the trace points at phlib native code, ensure the correct VC++ Redistributable is installed (see README) and the matching x86/x64 build is used.
  3. Pair with the Modules backtrace (error 5) lines that follow to see the full chain of containing modules.
Defensive patterns

Strategy: try-catch

Try / catch

try { Program.DumpDependencyChain(pe, Program.PrettyPrinter, depth); }
catch (RethrownException rex)
{
    // The original StackTrace was already dumped to stderr by SafeExecutor;
    // rex.InnerException preserves it programmatically for logging.
    Logger.Error(rex.InnerException, "dependency resolution failed");
}

Prevention

When it happens

Trigger: Same as error 3: any non-RethrownException escaping the SafeExecutor action during dependency resolution.

Common situations: Same as error 3 - the stack trace is the primary tool for finding the real failing call (BinaryCache.LoadPe, PE.GetImports, Mono.Cecil parsing, etc.).

Related errors


AI-assisted analysis of lucasg/Dependencies@1997a40000 (2026-08-13). Data as JSON: /api/errors/dcf50ca7a5574b89. Report an issue: GitHub.