lucasg/Dependencies · error

- "{0:s}"

Error message

 - "{0:s}"

What it means

Printed by PeDependencyItem.SafeExecutor<T> (Program.cs:546) inside its catch(RethrownException rex) branch. A RethrownException is only ever thrown by the sibling catch(Exception) below (Program.cs:554), so seeing this line means a dependency node deeper in the recursion already failed, was wrapped once, and is now bubbling up through this item's SafeExecutor. The line prints the current item's Filepath to build a human-readable module backtrace, then re-throws the same RethrownException so it keeps unwinding.

Source

Thrown at Dependencies/Program.cs:546

            string Tabs = string.Concat(Enumerable.Repeat("|  ", localRecursionLevel));
			Console.WriteLine("{0:s}├ {1:s} ({2:s}) : {3:s} ", Tabs, ModuleName, SearchStrategy.ToString(), Filepath);
		}

        private void SafeExecutor(Action action)
        {
            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);
        }

View on GitHub (pinned to 1997a40000)

Solutions

  1. Read the chain of these lines from the LAST printed up to identify the deepest module that started the failure, then resolve that module's load problem (unlock/restore the file).
  2. Lower the recursion depth with `-depth N` to isolate which branch of the dependency tree triggers the failing module.
  3. Enable the binary cache (`-cache`) so transient file-locking failures during recursive loading are avoided.
Defensive patterns

Strategy: try-catch

Try / catch

// RethrownException is the single failure type escaping SafeExecutor.
// Catch it ONCE at the top-level entry point; do not swallow it lower down.
try
{
    Program.DumpDependencyChain(pe, Program.PrettyPrinter, depth);
}
catch (RethrownException rex)
{
    // rex.InnerException chain holds the original cause; module backtrace already
    // printed to stderr by each SafeExecutor frame.
    Console.Error.WriteLine($"Dependency resolution aborted: {rex.Message}");
}

Prevention

When it happens

Trigger: During DumpDependencyChain -> PeDependencies ctor -> Root.ResolveDependencies() (Program.cs:428-492) recursion: a child PeDependencyItem.LoadPe()/ResolveDependencies() throws, its SafeExecutor wraps it as RethrownException, and each ancestor SafeExecutor prints this line as it propagates.

Common situations: A transitively-required DLL cannot be loaded/parsed (locked, deleted mid-run, corrupted), so the whole chain resolution aborts and the backtrace of containing modules is printed to stderr.

Related errors


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