ANTS Performance Profiler - 7.4
Troubleshooting application crashes - ANTS Performance Profiler
If the application you are profiling stops responding, fails to load, or closes unexpectedly, the profiling process may have caused the profiled application to crash. If this happens, you may not receive profiling results for your session, or you may receive incomplete results captured before the crash.
This topic describes ways to troubleshoot crashes during profiling.
If your profiling session returns no results, or incomplete results, but does not hang or crash, see Troubleshooting missing results.
Troubleshooting all crashes
If the application crashed but did not return the above error message, try the following approaches. They are listed in order of how likely they are to resolve common causes of crashes.
Force your application to use .NET 4
Many crashes can be avoided by rebuilding the application as a .NET 4 executable, and profiling it using the Attach to a .NET 4 process option in Application Settings.
For instructions on reconfiguring your application for use with this profiling method, see Forcing your application to use .NET 4.
The Attach to a .NET 4 process approach profiles your application when it is already running, rather than launching a new instance of the application. Because attaching to a running process does not change the way the application's code executes, it is less likely to cause a crash.
Run ANTS Performance Profiler from the Visual Studio menu
If the crash occurs in a profiling session launched directly from ANTS Performance Profiler, try profiling using the Visual Studio ANTS Performance Profiler add-in instead.
For instructions see Using the Visual Studio add-in.
Delete corrupt third-party PDBs
The following third-party assemblies sometimes contain corrupt .pdb files, which can cause crashes during profiling:
- Microsoft.Practices library
- AjaxControlToolkit
For instructions on finding and deleting corrupt .pdb files, see Troubleshooting PDB problems.
Troubleshooting web application crashes
If the application you are profiling is a web application, try the following two steps.
Profile using another web server application
Some applications that crash under profiling can be profiled successfully if run on another type of server application:
- If you are profiling in IIS, switch to the ASP.NET built-in web development server.
- If you are profiling in the ASP.NET web development server, switch to IIS.
Note that changing environments will work only if the server application you select supports all your application's features:
- Applications using integrated pipeline mode, impersonation, or HTTPS will not run on the built-in web-development server.
- Applications that cannot operate in a restricted security context may not run in IIS.
Profiling results obtained in from applications running on the web development server may also differ from performance in a production environment.
IIS: ensure you are profiling on the correct port
- If you are using IIS 6 or IIS 7, select Unused port and choose a port that is not used by IIS.
Note that this will not work if your application's code binds to a specific port.
- If you are using IIS 5, or if you are using IIS 6 or 7 and your application binds to a specific port, select Original port.
IIS will restart so that the profiler can attach to the port.
Troubleshooting error messages
StackOverflow Exception
During line-level profiling, if the application you are profiling is very large or the profiling session lasts a long time, a stack overflow can occur. If this happens, the application will crash and may record a "StackOverflow Exception" error in the log. (For instructions on finding the ANTS Performance Profiler logs, see Log files.)
To reduce the risk of an overflow, open the Tools menu, click Options, and select Simplify very complex stack traces to save memory.
If this does not prevent the crash, try profiling in sampling mode: on the Application Settings dialog box, set the Profiling mode to Sample method-level timings (fastest, least detail, no hit counts).
Getting more help
If the steps above do not prevent the profiled application from crashing, please contact Red Gate support, including, if possible, a log of the application crash.
Was this article helpful?
ANTS Performance Profiler
- Installation error 5100 when installing ANTS Performance Profiler and ANTS Memory Profiler
- Attach to process unavailable with some anti-virus software
- Memory leaks observed when profiling Windows Presentation Framework (WPF) applications
- Log files
- The manifest for the SQL server event source did not match the generated events. Some SQL events may report incorrect data. To fix this issue, consider recompiling etwcls.mof
- Setting file I/O and child process profiling in high DPI modes
- HTTP request timings in IIS
- Profiling web services in IIS Express
- Method not found: 'UInt32 <Module>._ANTS_Begin_Sql(System.String)'
- Enabling line-level timings for SecurityTransparent code
- Profiling SharePoint 2010 in v6.0 - 6.3
- Profiling SharePoint subsites
- Problems synchronizing results
- Windows service profiling fails if the service uses a system account
- Profiling assemblies protected with DeployLx
- The type initializer for 'y.layout.hierarchic.ClassicLayerSequencer' threw an exception
- Forcing your application to use .NET 4
- Double hit counts occurring on one line
- System.EntryPointNotFoundException (Versions: 3,4 only)
- Methods in (ASCX) web controls may not appear
- Failed to CoCreate Profiler error profiling a Windows service
- Multiple-core portable computers may show inflated times (version 3)
- No .NET methods were profiled on web application
- ANTS Profiler code instrumentation method
- Add-in fails to load when using RunAs to start Visual Studio as another user
- Profiling unit tests using Nunit
- Can I profile Compact Framework applications?
- Profiling a SharePoint 2007 Web Part
- Profiling an assembly in the Global Assembly Cache (GAC)
- Profiling IIS web applications that need to run under the SYSTEM account
- Profiling a web application hosted in IIS on a fixed TCP port
- Profiling client-side XBAP .NET applications
- ANTS Profiler prompts for location of source code which is not your own source code
- ANTS menu remains in Visual Studio after uninstall of ANTS Profiler
- Profiling a web application needing to run as the Network Service account
- Cannot start COM+ application via Remote Desktop
- Finding the overall time taken to execute a thread
- Profiling BizTalk applications
- Profiling Microsoft Office managed-code add-ins
- The system cannot find the file specified
- Error Stopping IISAdmin profiling IIS web application on Windows XP
- Creating a global debugging symbols (PDB) directory
- Using the add-in to profile solutions containing more than one project
- Methods may be missing on multi-core systems in version 3
- ASP .NET 1.x application recycling causing incomplete results
- Application recycling causes incomplete results and other errors when profiling ASP .NET
- (version 5) Support for profiling Silverlight applications
- Couldn't open metabase error when profiling ASP .NET hosted in IIS
- Failed to coCreate Profiler on ASP .NET web application
- HTTP error 404.17 profiling ASP .NET 1.1 on IIS 7
- Performance counters missing from results
- Isolating single ASP .NET pages in ANTS Profiler results
- Missing hits for lines in the source code view
- ANTS Profiler restarts IIS
- Showing the amount of time taken for a method in one particular thread
- Please specify a valid URL message profiling ASP .NET
- Times on individual lines do not add up to method time
- Explanation of "thread blocked" methods in ANTS Profiler
- Call graph percentages do not add up exactly
- Operation could destabilize the runtime error profiling ASP .NET
- IIS ceases to work after profiling web applications
- Problems with ANTS Visual Studio integration
- ANTS Profiler has been split into two distinct programs
- Windows Installer errors 1603 and 2738 occurring during installation
- Times in source code window are greater than the times showing in the method grid or tree view
- Problems with ANTS Performance Profiler Visual Studio integration
- Profiling ClickOnce applications deployed to IIS
- Could not enable tracing due to error code 112
- AjaxControlToolkit incompatibility causing application being profiled to crash
- Could not enable tracing because SQL Express is installed
- ANTS Performance Profiler menu items not showing in Visual Studio 2010
- Profiler stopping while profiling an in-browser Silverlight application
- "No Disk" error occurring while profiling application
- IE error "Internet Explorer cannot display the webpage" when profiling a website
- Profiler failing to connect to the server when profiling web applications
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
ANTS Performance Profiler
- Activating your products
- Activating your products
- Interpreting unexpected profiling results
- Choosing a profiling mode in ANTS Performance Profiler 6
- ANTS Performance Profiler 7 release notes - version 7.xx
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs
ANTS Performance Profiler
- Worked example: Profiling an ASP.NET application - ANTS Performance Profiler
- Worked example: Profiling from the command line - ANTS Performance Profiler
- Worked example: Profiling performance of an algorithm - ANTS Performance Profiler
- Worked example: Profiling network overheads - ANTS Performance Profiler

Using ANTS Performance Profiler