Este contenido no está disponible en su idioma de su preferencia.

El contenido se mostrará en otro idioma disponible. Su navegador puede proporcionar una funcionalidad para ayudarle a traducir el texto.

Obtaining a WinDbg Dump File to Troubleshoot Crashes in NI Software

Updated Feb 12, 2024

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

I am experiencing exceptions and crashes in my application, which uses NI Software. NI 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 NI 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 if SDK downloaded, check only Debugging Tools for Windows.
  1. Open your application.
  2. Launch WinDbg, e.g. by
    • (on Windows 11) navigating to Start Menu » All Apps » WinDbg Preview
    • (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 your 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, search and select LabVIEW.exe, Enerchron, or application. Click Attach/OK.windbg preview attach to file process 
  1. A command line window will appear in the main WinDbg application. For old Windows Dbg, select Debug » Go, else will start automatically.
  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 NI to further pinpoint the origin of LabVIEW, TestStand, Enerchron, or other NI software process exceptions. As a typical dump file is several hundred MB in size, you cannot attach it to an email to NI Support. Instead, visit ni.com/ask and upload the file to your support ticket under the files section.Files Upload SRM.png
 

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 NI 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 NI 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, NI recommends using the WinDbg tool in most cases.