Debugging crashes using the ESRI Symbol Server


Summary At ArcGIS 9.3, ArcGIS Desktop applications generate user-mode error reports when ArcGIS applications fail. Error reports contain all the important information about the application that was running when it failed. ArcGIS developers are able to open the dump file in Visual Studio and locate the function call where the error occurred. The minimum requirements for working with an error report are Microsoft Visual Studio and access to the ESRI ArcGIS Symbol Server. At ArcGIS 9.3, these error reports are created for ArcGIS 9.3 Desktop applications and extensions (this excludes ArcEngine).

In this topic


About debugging crashes using the ESRI Symbol Server

ESRI is dedicated to continually improving the quality of its suite of ArcGIS products. ArcGIS Desktop applications provide technologies that capture software crash data that developers can utilize as an additional debugging tool. If the ArcGIS application crashes, the user is prompted to send the error report (via a Web service) to ESRI. In the event that ArcMap crashes due to a custom application command or extension, developers can leverage the information contained in the ESRI error report.
To view and debug an error report, download the symbol files from Microsoft and ESRI, with Visual Studio installed. The following sections detail error reports, symbol files, and information for opening and debugging the error report in Visual Studio.

Error reports

Beginning with ArcGIS 9.3, ArcGIS Desktop applications and extensions produce an error report if the application fails. An error report contains important information about where the failure occurred. By default, the error dialog box that appears allows the user to send the error report to ESRI via a Web service. Regardless of whether the user decides to send the error report, the most recent 10 error reports are saved to the local %APPDATA%\ESRI\ErrorReports user directory with a .dmp file extension. When the number of error reports in the directory exceeds 10, the oldest error reports are automatically deleted as new error reports are saved.
To view an error report, download the appropriate symbol files, then open the error report file in Visual Studio as outlined in the following sections.

Symbol files

To debug an ArcGIS Desktop error report, you must have access to the symbol files for both ArcGIS and Microsoft. Symbol files provide a footprint of the functions that are contained in executable files and dynamic-link libraries (DLLs). Additionally, symbol files can present a roadmap of the function calls that lead to the point of failure. See How to use a symbol server on the Microsoft Developer Network (MSDN) Web site.
  1. Start Microsoft Visual Studio.
  2. On the Tools menu, click Options.
  3. On the Options dialog box, click to expand the Debugging node, then click Symbols.
  4. Under the "Symbol file (.pdb) locations" area, click the folder icon and add http://msdl.microsoft.com/downloads/symbols (for Microsoft symbols) and http://downloads2.esri.com/Support/symbols/ (for ESRI symbols). See the following screen shot:

     
The data at the symbol file locations in Step 4 is for downloading only (cannot be browsed).
  1. Ensure that the "Search the above locations only when symbols are loaded manually" check box is not selected.
  2. Since you are using symbols on a remote symbol server, you can improve performance by creating and specifying a local directory to which the symbols can be copied. To do this, type a path in the "Cache symbols from symbol servers to this directory" text box (for example: C:\SymbolsCache).
  3. Click OK.
  4. Since you are using the Microsoft public symbol server, an End User License Agreement dialog box might appear as you initially access the symbols. Click Yes to accept the agreement and download symbols to your local cache.
The initial downloading of symbols from the symbol file location might take a substantial amount of time. 

Opening an error report and finding the exception

Although Visual Studio can read error reports that contain information about managed code and unmanaged code, for managed code you must use Microsoft's Son of Strike (SOS) tool. For more information on the SOS tool, see How to use SOS on the MSDN Web site.
  1. Start Visual Studio.
  2. On the File menu, click Open, then click Project.
  3. In the Open Project dialog box, locate and select the dump file (it usually has a .dmp extension).
  4. Click OK.
  5. Press F5 to start debugging and show the location where the exception occurred.






Development licensing Deployment licensing
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo
ArcReader ArcReader