Obtaining a WinDbg Dump File to Troubleshoot Crashes in National Instruments Software

Updated Feb 11, 2019

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

I am experiencing exceptions and crashes in my application, which uses National Instruments Software. National Instruments has requested a WinDbg dump file (.dmp) to perform further troubleshooting. How do I obtain this file?

Solution

The WinDbg tool can be used to monitor process exception information while an application is running. If a crash, exception, or other severe issue occurs in the application, WinDbg will generate a dump file containing information on the underlying code that is executing at the moment of the problem. This information can be helpful for National Instruments to characterize the problem. The steps below describe the recommended procedure for configuring WinDbg, and how to obtain the dump file.


Installing and using WinDbg
  1. To obtain the tool, download one of the following installers:
  2. Execute the installer, check only Debugging Tools for Windows.
  1. Open your application.
  2. Launch WinDbg, e.g. by
    • (on Windows 10) navigating to Start Menu » Programs » Windows Kits » Debugging Tools for Windows » WinDbg.
    • (on Windows 7) navigating to Start Menu » All Programs » Debugging Tools for Windows » WinDbg.
Note: Please make sure to use the appropriate version of WinDbg for the software process you are interested in. For example, WinDbg (x86) should be used with LabVIEW 32-bit and WinDbg (x64) should be used with LabVIEW 64-bit.
 
  1. In WinDbg, select File » Attach to a Process.
  2. Select you application's process from the Process List. Selecting Sort » By Executable to alphabetically sort the process list can help finding your process. In case you are running your application in the LabVIEW Development Environment, select LabVIEW.exe. Click OK.
  1. A command line window will appear in the main WinDbg application. Select Debug » Go.
  2. WinDbg is now monitoring the process. At this point, attempt to replicate the crash or exception in your application. Once the behavior occurs, Navigate to the WinDbg application Window.
Note: When WinDbg catches a process exception, your application will appear unresponsive, and will not allow user interaction anymore.
 
  1. Create a dump file by typing the following command into the prompt at the bottom of the WinDbg window: .dump /ma C:\[path]\filename.dmp. Use a path you have writing access to, e.g. your local desktop.
  1. WinDbg will need some time to write the dump file. Check for any error or success message in the WinDbg window afterwards.
  1. Close WinDbg. This will automatically close your application as well.

The dump file created by WinDbg may be used by National Instruments to further pinpoint the origin of LabVIEW process exceptions. As a typical dump file is several hundred MB in size, you cannot attach it to an email to National Instruments Support. You can use any other file transfer method, e.g. using NI's ftp server: How Do I Transfer Files to a FTP Server?

Additional Information

Troubleshooting compiled executable files
WinDbg can also be used to troubleshoot exceptions that occur in LabVIEW-built executables. As opposed to attaching WinDbg to the LabVIEW.exe process as used as example above, you can attach the debugging tool to your custom application. This diagnostic information can often be used by National Instruments Support to analyze areas of the LabVIEW Run-Time System, much like the Development Environment.

Alternate Methods
An alternative method for unresponsive software, that hangs instead of crashing, is available for Windows 7 and later: Open Windows' Task Manager, and can right-click the LabVIEW.exe process, then choose Create Dump File to create this dump file.
If your are using and 64-bit operating system and 32-bit National Instruments Software, you need to launch the 32-bit version of Task Manager, normally stored in the following location: C:\Windows\SysWOW64\taskmgr.exe

Windows XP and older
In Windows XP and previous, the Dr. Watson tool can also be used to provide supplemental crash information. However, National Instruments recommends using the WinDbg tool in most cases.

WAS THIS ARTICLE HELPFUL?

Not Helpful