This page describes how to use the AD Plus tool and how to analyze the AD crash dumps. Ad plus tool is used when CAST AIP analysis crashes without any error message either in CAST AIP log or CAST MS log.

Ad plus tool can be used to retrieve the AD crash dumps from which information about CAST AIP crash can be retrieved for analysis.

If the application to debug is in Java, use Tools - Java VisualVM instead.

Applicable CAST Version
CAST Version
Yes/No
8.3.x(tick)
Applicable RDBMS
RDBMS
Yes/No
CSS(tick)

Install ADPlus

Install ADPLUS crash dump according to the Windows Operating system version you are using.

Installing ADPlus in a CRASH mode for Windows xp, vista

  1. Download WinDbg the Debugging Tools for Windows .
  2. Run the executable to install the tool, accept all default options.
  3. Create a output directory. For instance, C:\temp\adplus
  4. Update the RUNMode, ProcessName and  OutputDir settings by opening the adplus_crash_mode.cfg file available at adplus_crash_mode.cfg
    You will see the Settings as follow (may need to change this to anarun, jeecmd, donnetcmd, depending on what is crashing)
    <Settings>
    <RunMode> CRASH </RunMode>
    <ProcessName> anaman.exe </ProcessName>
    <OutputDir> c:\temp\adplus </OutputDir>
    </Settings>
  5. Copy the adplus_crash_mode.cfg file into the output directory

Creating a Crash Dump

Follow the instructions below:

  1. Install ADPlus
  2. If you are using J2EE Analyser then add in the file C:\Documents and Settings\All Users\Application Data\CAST\CAST\X.Y\globallysharedsettings.ini the lines :
    [WebAnalyzerOptions]
    ThrowGPF=1
    [global]
    ProductionMode=0
  3. Launch the executable which crashes but do not run the operation leading to the crash yet.
  4. Open a command shell
  5. Switch to the folder where the debuggers are installed (C:\Program Files\Debugging Tools for Windows)
  6. Type (may need to change this to anarun, jeecmd, donnetcmd, depending on what is crashing):
    adplus.vbs -crash -o C:\temp\adplus -pn AnaRun.exe 
    You may be prompted to change your default script interpreter from Wscript.exe to Cscript.exe. Accept this change. Accept the warning about _NT_SYMBOL_PATH.
  7. Launch the operation leading to the crash. ADPlus will create a directory containing the Crash dump under the output dir OutputDir with a name containing a date/time stamp.


Installing ADPlus in a CRASH mode for Windows 8, Windows 10

To take ADPLUS Crash dump please install the SDK from the link: Windows Software Development Kit (SDK) for Windows 8.1

Once the installation is done check in the below path if the ADPLUS.exe exists which confirms that the SDK has been correctly installed: 

 

Open command line from the path where adplus.exe exists and run the below command if you are interested to take the crash dump of Anarun (may need to change this to anarun, jeecmd, donnetcmd, depending on what is crashing):

 

adplus -crash -o <crash_dump_output_path> -pmn AnaRun.exe

If the anarun is 32 bit which is in the case when you are using 7.3.x or only VB analyzer in 8.x.x then you have to trigger 32 bit adplus else if the anarun is 64 bit then you have to trigger 64 bit adplus.

32 bit adplus: C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86

64 bit adplus: C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64

Note: The installed path can be customized by the user during the installation of SDK and hence the above path can be changed accordingly.

Please find the screen shot below:

Now your ADPLUS is ready to monitor the Anarun.exe if it runs, so go to CAST-MS and run the analysis which is crashing and you will see the information in the command line once anarun triggers by CAST-MS

Please find the screen shot below where the last line says Attaching to 13412 - Anarun in crash mode <date-time>

Once the analysis is crashed as seen below:

Find the screen shot below which shows once the analysis is crashed, the crash dump has been created and the ADPLUS is exited

ADPLUS crash dump folders below:

Below screen shot will give you the file content in the adplus crash dump folder


Analyzing the Crash dump

Follow the instructions below:

  1. Install ADPlus in a CRASH mode
  2. Set the Symbol path
  3. Set the Image path
  4. Open the ADPlus Crash Dump by going to File>Open Crash dump...
    A Command window will get opened containing the ADPlus traces. An example of a Command window content is given below:
    Comment: '1st_chance_IntegerDivide_exception_in_ENLIGHTEN.EXE_running_on_FFUXPLAP'_
    Symbol search path is: C:\temp\pdb
    Executable search path is: I:\Releases\6.3\6.3.1_2186\6.3.1_Build2186_flat
    Windows XP Version 2600 (Service Pack 3) MP (2 procs) Free x86 compatible
    Product: WinNt, suite: SingleUserTS
    Machine Name:
    Debug session time: Fri Jul 10 10:06:52.000 2009 (GMT+2)
    System Uptime: not available
    Process Uptime: 0 days 0:03:05.000
    ................................................................
    ................................................................
    ...............................................................
    This dump file has an exception of interest stored in it.
    The stored exception information can be accessed via .ecxr.
    (29c.1168): Integer divide-by-zero - code c0000094 (first/second chance not available)
    eax=00000000 ebx=000000bf ecx=000003e8 edx=00000000 esi=000003e8 edi=1d0b60c8
    eip=15587326 esp=0012de80 ebp=0012e7ac iopl=0 nv up ei pl zr na pe nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00210246
    GRLIBX32!CDefPos::GetPosition+0x5a6:
    15587326 f7bd7cffffff idiv eax,dword ptr [ ebp-84h ] ss:0023:0012e728=00000000
  5. Analyse the CRASH dump
    If the dump file contains any exception, read the stack to localize the crash in the CAST source code (dll and method). You may need to go to View > Call Stack to display the stack content in more details to get the dll and method names.   
    In the above example, the crash occurs in the GRLIBX32 dll in the GetPosition procedure.
    Check if the dll is a CAST's dll by looking for it in the executable files directory.

Debugging the Crash dump

Follow the instructions below:

  1. Install ADPlus in a CRASH mode
  2. Set the Symbol path
  3. Set the Image path
  4. Set the Source File path
  5. Open the ADPlus Crash Dump by going to File>Open Crash dump. A Command window will get opened containing the ADPlus traces as well as the CAST source code where the crash occurs.
  6. Debug the CAST source code. Useful command View > Processes and Threads

Set the Symbol path

The symbol path specifies the directories where the symbol files are located. To set it, do as follow:

  1. Unzip the symbols file I:\Releases\<major version>.<minor version>\<{}major.minor.maintenance.build>\Information\pdb.7z locally on your machine (for instance C:\temp)
    Example I:\Releases\6.3\6.3.1_2186\Information\Information
  2. Run WinDbg (Go to Start > All Programs > Debugging Tools For Windows (x86)> WinDbg)
  3. Go to File > Symbol File Path
  4. Click the Browse button
  5. Select the pdb file
    You will get the following Symbol Search Path window
  6. Click OK

Set the Image path

The Image path specifies the directories that the binary executable files are located in. To set it, do as follow:

  1. Go to File>Image file path
  2. Click the Browse button
  3. Select the executable files path
    You will get the following Executable Image Search Path window:
  4. Click OK

Set the Source path

The source path specifies the directories where the C and C++ source files are located. To set it, do as follows:

  1. Unzip the CAST source code
  2. Go to File > Source File Path
  3. Enter the CAST source code path