Client-Side Integration

As described on architecture page, your client application should be shipped with a crash reporting library. The crash reporting library's purpose is to catch exceptions in the client application, generate crash reports and send them over the Internet to CrashFix server.

Currently, CrashFix server supports receiving crash reports from the CrashRpt library. CrashRpt is a light-weight, free and open-source library distributed under the New BSD License. It can be used in both commercial and open-source applications, with or without modifications.

First of all, download the latest version of the CrashRpt library from its official project page.

Exhaustive instructions on how to install CrashRpt can be found on CrashRpt project's Online Documentation page.

Below, we provide specific instructions on how to configure CrashRpt to send crash reports to CrashFix server.

Configuring CrashRpt to Send Crash Reports to CrashFix Server

The CrashRpt configuration is typically stored in CR_INSTALL_INFO structure. In order to send crash reports to CrashFix server, you must set the following structure fields:

Below is an example of the code you may finally have:


    memset(&info, 0, sizeof(CR_INSTALL_INFO));
    info.cb = sizeof(CR_INSTALL_INFO);  
    info.pszAppName = _T("Editor");    // Define application name.
    info.pszAppVersion = _T("1.0.0");  // Define application version.
    // URL for sending reports over HTTP.			
    info.pszUrl = _T("http://example.com/crashfix/index.php/crashReport/uploadExternal");         
    // Define delivery transport priorities. 
    info.uPriorities[CR_HTTP] = 1;                     // Use HTTP.
    info.uPriorities[CR_SMTP] = CR_NEGATIVE_PRIORITY;  // Not use SMTP.
    info.uPriorities[CR_SMAPI] = CR_NEGATIVE_PRIORITY; // Not use Simple MAPI.  
    // Define flags.
    info.dwFlags = 0;                    
    info.dwFlags |= CR_INST_ALL_POSSIBLE_HANDLERS; // Install all available exception handlers.
    info.dwFlags |= CR_INST_HTTP_BINARY_ENCODING;  // Use binary encoding for HTTP uploads (recommended).      

Defining Custom Collection Name for Crash Report

CrashFix server groups incoming crash reports into collections (see Collections page). Although collection names are generated automatically by CrashFix server based on stack trace information, sometimes it may be required to define custom collection names. Since v.1.0.4, a client application is able to define custom collection name by adding custom property named 'CollectionId' to crash report. An example code is presented below:

    crAddProperty(_T("CollectionId"), _T("My Custom Collection Name"));

Please note that to define custom collection name, the client application need to implement some kind of logics that would determine the collection name based on information about a crash.

Further reading: Digest

Generated on Fri Jun 12 23:08:57 2015 for CrashFix by doxygen 1.5.9