The Event View panel logs information about exceptions and displays the sequence of function calls that caused the exception. This topic describes some peculiarities of tracing exceptions.
Controlling IsBadPtr Exceptions
AQTime must launch the application being profiled as a child process of AQTime itself, while in debugging mode. The profiled application may call Windows API functions. Some of these functions change their behavior under AQTime. For instance, in normal non-debugging mode, API functions
IsBadStringPtr return a non-zero value if invalid memory addresses are passed to them. In debugging mode the same invalid addresses will raise exceptions, which will of course be displayed in the Event View panel.
To suppress the display of these debugging-mode exceptions, enable the Exceptions > Hide IsBadPtr exceptions option of the Event View panel.
Controlling Consecutive Exceptions
The number of consecutive, uninterrupted, exceptions that will be logged to Event View is set by the Exceptions > Max consecutive exceptions option. When consecutive exceptions overflow this limit, Event View stops tracing them until it gets at least one non-exception event.
System and .NET Exceptions
Exceptions that occur in unmanaged (native) code are logged with the Exception events. Exceptions that occur in managed code are logged with the .NET Exception event. For each .NET exception the CLR generates a system exception that is traced and logged by AQTime.
|Note:||AQTime may fail to retrieve class names of exceptions that occur in 64-bit applications created with C++Builder XE3–XE8 and 10 - 10.3. AQTime also does not trace exceptions that occur in console applications created for .NET Framework ver. 1.0 and 1.1.|
Generating Dumps on Exceptions
You may command AQTime to generate dumps on exceptions automatically. To do this, enable the Generate dump on exception setting of the Event View panel and specify the folder that AQTime will save the generated dumps in, in the Dump folder setting.
If an exception occurs, AQTime checks the state of the Generate dump on exception setting and if this setting is enabled, AQTime generates a dump and saves it to the folder, specified by the Dump folder setting. For detailed information, see Generating Dumps for Profiled Applications.
When a .NET exception occurs, the CLR also generates a system exception. AQTime will export this system exception, not the .NET exception. The exception’s call stack will contain native-code information. It will not contain the names of managed routines.
By using the options of the Event View panel you can filter Win32 exceptions to be logged. The panel will only display those exceptions that are not included into the filter. This feature lets you ignore the exceptions that are not important and concentrate on critical issues.
To specify the exceptions to be skipped, use the Exceptions filter settings:
Select Options > Options from AQTime’s main menu to display the Options dialog.
Select Tools > Options from Visual Studio’s main menu and then switch to the AQTime category in the Options dialog that appears.
Select AQTime > Options from the main menu of Embarcadero RAD Studio to display the Options dialog.
From the list of settings on the left of the dialog, select the Profiling Time > Event View > Exceptions filter group. On the right, AQTime will display the list of exceptions to be filtered. By default, the list contains Win32 exceptions.
To command AQTime to skip certain exceptions when profiling your applications, select the appropriate check boxes in the list and press OK to save changes.
We would like to note that AQTime will only skip those exceptions that are added to and selected in the list. If an exception is not selected or it absents from the list, it will be displayed in the Event View panel.
To add an exception to the list, press Add and then specify the exception’s code and description in the ensuing Add Exception dialog.