Dependency Walker – An Advanced Troubleshooting Tool

Speed Up My PC

Sometimes normal troubleshooting steps just won’t cut it. We might need to go above and beyond - more like forensic troubleshooting. Today I’ll write about a tool that will help us in doing that.  Dependency Walker is a tool to analyze the dependencies of a Windows application –  like functions, modules, etc. It builds a hierarchical tree of all the dependent modules of a exe, dll, sys, etc.

Dependency Walker

Dependency Walker can help you in troubleshooting application errors, file registration errors, memory access violations and invalid page faults.

image thumb Dependency Walker – An Advanced Troubleshooting Tool

Dependency Walker becomes especially helpful if a specific program of yours is not loading, or a service is failing to start with an error pointing to a specific dll. In such cases you can load that program or dll in Dependency Walker, to see which file is failing to load or what module is causing the problem – and then fix it.

The program does not just load the modules, but it also scans for potential errors. According to the Help file, it performs the following jobs:

  • Detects missing files. These are files that are required as a dependency to another module. A symptom of this problem is the “The dynamic link library BAR.DLL could not be found in the specified path…” error.
  • Detects invalid Files. This includes files that are not Win32 or Win64 compliant and files that are corrupt. A symptom of this problem is the “The application or DLL BAR.EXE is not a valid Windows image” error.
  • Detects import/export mismatches. Verifies that all functions imported by a module are actually exported from the dependent modules. All unresolved import functions are flagged with an error. A symptom of this problem is the “The procedure entry point FOO could not be located in the dynamic link library BAR.DLL” error.
  • Detects circular dependency errors. This is a very rare error, but can occur with forwarded functions.
  • Detects mismatched CPU types of modules. This occurs if a module built for one CPU tries to load a module built for a different CPU.
  • Detects checksum inconsistencies by verifying module checksums to see if any modules have been modified after they were built.
  • Detects module collisions by highlighting any modules that fail to load at their preferred base address.
  • Detects module initialization failures by tracking calls to module entry points and looking for errors.
  • Dependency Walker can also perform a run-time profile of your application to detect dynamically loaded modules and module initialization failures. The same error checking from above applies to dynamically loaded modules as well.

For example, I was helping a client the other day - she was loading Internet Explorer, but IE kept crashing, without any specific errors. We had done most of the basic troubleshooting like disabling add-ons and toolbars, resetting IE to default setting etc.But  still it kept crashing. This meant that one or more files required for Internet Explorer to run properly, was creating a problem. It’s always hard to troubleshoot such cases but with Dependency Walker, we can see if something wrong with one of the dependent file.

So I loaded Internet Explorer in Dependency Walker.

image thumb1 Dependency Walker – An Advanced Troubleshooting Tool

I next, expanded the list one by one

image thumb2 Dependency Walker – An Advanced Troubleshooting Tool

Then I went through each of the modules, to see if I could find something suspicious there. I scrolled through the module and was lucky enough to find the problem.

image thumb3 Dependency Walker – An Advanced Troubleshooting Tool

I found that the IEFRAME.dll file was missing. So I went and replaced the file from the Windows Installation DVD. That solved the problem. Now Internet Explorer no longer crashed.

I hope this will tell you how easy it’s to use the tool to find out possible dependency errors.

How to use Dependency Walker

To use Dependency Walker to investigate errors, you can follow these steps:

  1. Start Dependency Walker
  2. Click Open on the File menu to load the problem file
  3. In the View menu, click Start profiling. The Profile Module dialogue box appears
  4. Type any switches, program arguments, other options you want and then click OK.

Dependency Walker will inject dwinject.dll before the error occurs and will log the events taking place at the time of the error.

Dependency Walker download

You can download Dependency Walker from here.

Posted by on , in Category Downloads with Tags
Shyam aka “Captain Jack” is a Microsoft MVP and a Windows Enthusiast whose area of expertise is Crash Dump Analysis and Advanced Windows troubleshooting. He has developed Windows based Tools like SF IE Restorator for troubleshooting Internet Explorer issues and SF Diagnostic Tool for collecting Crash dump files for troubleshooting purpose. He blogs at captaindbg.com.
  • http://www.greggdeselms.com/ Gregg L. DesElms

    This tool has been around since… oh, my… lemmee think…

    …hmm… I think at least Win9x, if memory serves. I know I’ve had a copy on every machine I’ve ever owned for YEARS; and it’s on the thumb/flash drive that I carry around so I can work on others’ machines if it need to.

    It’s really quite good! Obviously, one needs to learn how to use it, but for what it does, it’s pretty much best-of-breed!

    Nice tip for everyone! Thanks!

    _______________________________
    Gregg L. DesElms
    Napa, California USA
    gregg at greggdeselms dot com

  • B.Mazumdar

    In windows 7-Home Edition, am unable to start the service ‘Remote Access Connection Manager’ & get error 1068. Please let me know, if Dependency Walker would be able to help me out.

  • http://captaindbg.com Shyam Sasindran

    It may help. But I doubt if you can load the svchost.exe with a command switch.

  • Guest

    Dependency Walker is a great tool. But remember: current versions of Windows implement features Dependency Walker doesn’t support or isn’t specifically designed for (widespread use of 64-bit operating systems, WinSxS, Folder Redirection and UAC etc.).

    For example, this can lead to situations in which certain files (such as the file in this article) might actually be available on the system, but do not show up in Dependency Walker. This limits the use of Dependency Walker as a diagnostic tool for current systems – and leaving the actual issue unresolved.