lucasg/Dependencies · warning

Loading module {0:s} failed.

Error message

Loading module {0:s} failed.

What it means

Status message set by App.LoadBinary (DependenciesGui/App.xaml.cs:62) when BinaryCache.LoadPe returns null OR a PE whose LoadSuccessful is false. Per BinaryCache.LoadPe's contract (DependenciesLib/BinaryCache.cs:66-68), null means not found and LoadSuccessful==false means the file exists but is not a valid PE. LoadBinary still returns the (failed) pe object rather than null in the LoadSuccessful==false case.

Source

Thrown at DependenciesGui/App.xaml.cs:62

            {
                mainWindow.AppStatusBarMessage.Content = (object)StatusBarMessage;
            }
        }

        public PE LoadBinary(string path)
        {
            StatusBarMessage = String.Format("Loading module {0:s} ...", path);

			if (!NativeFile.Exists(path))
			{
				StatusBarMessage = String.Format("Loading PE file \"{0:s}\" failed : file not present on disk.", path);
				return null;
			}

			PE pe = BinaryCache.LoadPe(path);
            if (pe == null || !pe.LoadSuccessful)
            {
                StatusBarMessage = String.Format("Loading module {0:s} failed.", path);
            }
            else
            {
                StatusBarMessage = String.Format("Loading PE file \"{0:s}\" successful.", pe.Filepath);
            }
            
            return pe;
        }

        void App_Startup(object sender, StartupEventArgs e)
        {
            (Application.Current as App).PropertyChanged += App_PropertyChanged;

            Phlib.InitializePhLib();

			// Load singleton for binary caching
			BinaryCache.InitializeBinaryCache(Dependencies.BinaryCacheOption.GetGlobalBehaviour() == Dependencies.BinaryCacheOption.BinaryCacheOptionValue.Yes);

View on GitHub (pinned to 1997a40000)

Solutions

  1. Verify the file is a valid PE with another tool (dumpbin, PE-bear).
  2. If using the binary cache, disable it (Options->Properties->Binary cache = No) and retry to rule out a stale cached copy.
  3. Re-download/rebuild the binary if truncated or corrupted.
Defensive patterns

Strategy: validation

Validate before calling

// Distinguish the two LoadBinary failure modes by re-checking LoadSuccessful.
PE pe = (Application.Current as App).LoadBinary(path);
if (pe == null)
{
    // file not present on disk (error 10 path)
    return;
}
if (!pe.LoadSuccessful)
{
    // file present but not a valid PE - LoadBinary still returns the failed pe
    Console.Error.WriteLine($"{path} is not a valid PE");
}

Prevention

When it happens

Trigger: Opening a file in DependenciesGui that exists but fails phlib parsing, or whose cached load yields a non-loadable PE.

Common situations: Same kinds of inputs as error 9 (non-PE, truncated, wrong architecture) but reached through the GUI; also stale cache entries when `-cache` mode is on.

Related errors


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