LogoLogo
HomePlatform IntegrationsDownloadsLogin
  • Welcome
  • 📌Introduction
    • Getting Started
      • Signing Up
      • Creating a Database
      • Platform Integrations
        • 💻Desktop
          • BugSplat Crash Reporting Library for Windows (Native C++)
            • Full Memory Dumps
            • Windows (Native C++) Dependencies
          • Windows (.NET Framework)
          • macOS
          • Linux
        • 🔀Cross-Platform
          • .NET Standard
          • Breakpad (Deprecated)
          • Crashpad
            • How to Build Google Crashpad
          • Deno
          • Electron
          • Java
          • Node.js
          • Python
          • Qt
        • 🎮Game Development
          • CRYENGINE
          • Nintendo Switch
          • PlayStation
          • Unreal Engine
            • Unreal Engine Plugin
          • Unity
          • Xbox
        • 📱Mobile
          • Android
          • Ionic
          • iOS
          • React Native
        • 🕸️Web
          • Angular
          • JavaScript
          • React
          • Vue
        • ⌛Downloads
      • Platform Samples
        • BugSplatTester (iOS)
        • BugSplatTester (macOS)
        • myConsoleCrasher (C++)
          • Address Sanitizer Reports
        • my-android-crasher
        • my-angular-crasher
        • my-electron-crasher
        • my-java-crasher
        • my-node-crasher
        • my-qt-crasher
        • my-react-crasher
        • my-unity-crasher
        • my-unreal-crasher
      • Inviting Team Members
      • Importing Crashes
      • Troubleshooting
      • Quickly Submitting Your First Crash in Under 5 Minutes
    • Development
      • Using the App
      • Symbol Files
        • Common Symbols
        • How to Manually Upload Symbols
        • Source Maps
        • Symbol Servers
        • Working with Symbol Files in Windows Environments
      • Searching
        • Table Filtering
        • Table Grouping
      • Grouping Crashes
      • Commenting
      • Integrations and Third Party Tools
        • Configurable Alerts
          • Slack
          • Microsoft Teams
          • Discord
          • Email
          • Webhook
        • Issue Trackers
          • Azure DevOps
          • Favro
          • Jira
          • GitHub Issues
          • GitLab
          • Monday.com
          • YouTrack
          • Auto-Creating Defects from BugSplat Databases in Attached Third-Party Issue Trackers
      • API
        • Web Application Endpoints
          • Charting
          • Company
          • Crash
          • Crashes
          • Crash Groups
          • Databases
          • Defect
          • Events
          • Import/Migrate
          • Support Response
          • User (GDPR)
          • Users
          • Versions
        • Crash Post Endpoints
        • OAuth2
        • Defect Tracker Options
        • Paging, Filtering, and Grouping
        • Platform Specific API's
          • C++ Native API
          • .NET API
    • Production
      • Versions
      • 🆕Regression Alerts
      • Security and Compliance
        • Security Program
        • BugSplat Security Program Inquirys
        • SOC 2
        • GDPR & UK GDPR Compliance
        • Avoid Collecting Personally Identifiable Information (PII)
        • Crash Expiry
        • Terms
        • Privacy Policy
      • Support Responses
      • BugSplat Status
  • 🍎Education
    • BugSplat Terminology
    • How-Tos
      • Creating Defects
      • Contacting End-Users
      • Crash Dialog Branding
      • Reprocess Crashes
      • Batch Reprocess Crashes
      • Using the Crash Attribute Feature
      • Send Feedback
      • Remove Crashes
    • Videos
      • BugSplat Product Walkthrough
    • FAQs
      • How Do I Upload Crashes with Python?
      • How Do I Remove Symbol Files?
      • Crash details 'Active Thread'
      • How long does it take to process a crash?
      • How BugSplat handles large crash volumes
      • How Does Crash Rate Limiting Work?
      • Add Custom Branding to Support Response
      • Finding Missing Reports
      • Using Dark Mode
      • What If My App or Game Grows Quickly?
      • Does BugSplat have an effect on application performance?
      • Manually Upload Crash Reports to BugSplat
      • How to configure proxy settings in BugSplat
      • Using BugSplat's public database
      • How to Upload Symbol Files with Symbol-Upload
      • Using SendPdbs to Automatically Upload Symbol Files
      • Managing Symbol Space
      • Why Group Crashes?
      • Uploading third-party DLLs without PDB files
      • Localized Support Responses for Windows C++, .NET, and macOS
      • BugSplat application uptime data
        • What are the upload size considerations with BugSplat accounts.
      • Is an application's source code safe when using BugSplat?
      • How to get correct callstacks with BugSplat in Steam
      • What is a crash reporter?
      • Common End-User Questions
        • Missing BugSplat.dll
        • What should I do if I get a BugSplat?
        • What is BsSndRpt.exe?
        • My software just crashed. Should I contact BugSplat for help?
  • 🏢Administration
    • Billing
      • Free Trial Overview
      • Plans and Billing Overview
      • How to Sign Up for a BugSplat Plan
      • Viewing Account Usage
      • Upgrading, Changing, or Canceling Your Plan
        • Upgrading or Downgrading Your Plan
        • Adding Additional Crashes and Storage Space
        • Updating Credit Card and Billing Information and Viewing Billing History
        • Updating Tax and VAT Information
        • Canceling Your Plan
      • Free and Discounted Plans
        • Free Plan Overview
        • Free Crash Reporting for Indie Game Development
        • Education
        • Open-Source
        • Good Causes
      • Plans, Upgrades, and Payments FAQ
        • Fair-Refund Policy
        • Update to Our Legacy Plans Guide
        • Updates to BugSplat Pricing Plans - March 2024
        • Using Coupons and Promotions at BugSplat
        • What is 'High Volume Fractional Crash Processing'?
    • Account
      • Migrating Databases
      • Deleting Databases
      • Deleting a Company Account
      • Changing Company Name
    • User Management
      • User Permissions
      • Deleting a User
      • Requesting Access
      • Login Page and Options
      • Password Settings and Reset Options
        • Required Password Reset - August 4th, 2023
      • Single Sign-On (SSO)
      • Multi-Factor Authentication (MFA)
      • Enforce MFA
      • Adding New Users in Companies with Multiple Databases
    • Contact us
  • 🐛About
    • What is BugSplat?
    • Why BugSplat?
    • Who is BugSplat?
      • Our Values
      • Charitable Giving
      • Brand Guidelines
    • Partnerships
    • Misc
      • Promotions
        • March 2024 - Game Developer Free Months of Service
      • Giveaways
        • April 8 - April 22, 2025
        • Feb 18 - March 17, 2025
        • Jan 15 - Feb 13, 2025
        • December 19-29, 2024
        • November 21–28, 2024
        • October 17-24th, 2024
        • September 19-26th, 2024
        • July 18 - July 23, 2024
        • April 18 - May 12, 2024
        • March 18 - April 03, 2024
        • November 15-30, 2023
        • October 9-23, 2023
  • 🔀Changelog
    • Changelog
Powered by GitBook
On this page
  • Overview
  • Tutorial
  • Integrating Crashpad
  • Additional Considerations
  • Databases
  • Optimizations

Was this helpful?

  1. Introduction
  2. Getting Started
  3. Platform Integrations
  4. Cross-Platform

Crashpad

PreviousBreakpad (Deprecated)NextHow to Build Google Crashpad

Last updated 10 months ago

Was this helpful?

Overview

Want help building Crashpad? View our step-by-step guide to help you more quickly get started .

Crashpad is the latest open-source crash reporting tool built by Google and is the successor to the popular Breakpad crash reporter. Crashpad allows you to submit minidumps to a configured URL after a crash occurs in your product. The official Crashpad documentation is available . Crashpad and Breakpad are 'wire compatible.' The crash reports created by both systems are processed similarly on our backend.

Tutorial

To begin, and unzip the BugSplat Crashpad software development kit. The download contains a sample Crashpad application and a compiled version of Crashpad for Windows.

It's also possible to download and build Crashpad yourself. This step is required if you are targeting an OS other than Windows. See our doc for our step-by-step guide to building Crashpad.

To get a feel for the BugSplat service, experiment with the myCrashpadCrasher sample application before enabling your application. You can find the Visual Studio project file located in your download folder at ...\BugSplatCrashpad\BugSplat\samples\myCrashpadCrasher\myCrashpadCrasher.vcxproj.

Run the sample application without the debugger attached to post a crash report to our public "fred@bugsplat.com" database. To view the report, log in to the public database using the account "fred@bugsplat.com" and the password "Flintstone."

Integrating Crashpad

Follow the myCrashpadCrasher pattern to enable Crashpad in your application.

Step 1

Add the following includes:

#include "client/crashpad_client.h"
#include "client/crash_report_database.h"
#include "client/settings.h"

Step 2

Copy the initializeCrashpad and GetCrashpadHandlerPath methods from the BugSplat sample. The Crashpad url and parameters format, database, product and version are required to upload crash reports to BugSplat. You can optionally specify values for the parameters user, list_annotations, and key which will be tracked with each crash report.

CrashpadClient *initializeCrashpad(char *dbName, char *appName, char *appVersion)
{
  // Get directory where the crashpad_handler.exe file lives, sample implementation of this method is provided in the myCrashpadCrasher sample
  std::wstring handlerPath = GetCrashpadHandlerPath();

  if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(handlerPath.c_str()))
  {
    return NULL;
  }

  // Ensure that handler is shipped with your application
  base::FilePath handler(handlerPath);

  // Directory where reports will be saved. Important! Must be writable or crashpad_handler will crash.
  base::FilePath reportsDir(L"./crashpad"); 

  // Directory where metrics will be saved. Important! Must be writable or crashpad_handler will crash.
  base::FilePath metricsDir(L"./crashpad"); 

  // Configure url with your BugSplat database
  std::string url;
  url = "https://";
  url += dbName;
  url += ".bugsplat.com/post/bp/crash/crashpad.php";

  // Metadata that will be posted to BugSplat
  std::map<std::string, std::string> annotations;
  annotations["format"] = "minidump";                 // Required: Crashpad setting to save crash as a minidump
  annotations["database"].assign(dbName);             // Required: BugSplat database
  annotations["product"].assign(appName);             // Required: BugSplat application name
  annotations["version"].assign(appVersion);          // Required: BugSplat version number
  annotations["key"] = "Sample key";                  // Optional: BugSplat key field
  annotations["user"] = "fred@bugsplat.com";          // Optional: BugSplat user email
  annotations["list_annotations"] = "Sample comment";	// Optional: BugSplat crash description

  // Disable crashpad rate limiting so that all crashes have dmp files
  std::vector<std::string> arguments;
  arguments.push_back("--no-rate-limit");

  // Initialize crashpad database
  std::unique_ptr<CrashReportDatabase> database = crashpad::CrashReportDatabase::Initialize(reportsDir);
  if (database == NULL) return false;

  // Enable automated crash uploads
  Settings *settings = database->GetSettings();
  if (settings == NULL) return false;
  settings->SetUploadsEnabled(true);

  // Files to upload with the crash report - default bundle size limit is 20MB
  std::vector<base::FilePath> attachments;
  base::FilePath attachment(L"./attachment.txt");
  attachments.push_back(attachment);

  // Start crash handler
  CrashpadClient *client = new CrashpadClient();
  bool status = client->StartHandler(handler, reportsDir, metricsDir, url, annotations, arguments, true, true, attachments);
  if (status == false) return NULL;

  // Wait for handler to initialize
  status = client->WaitForHandlerStart(INFINITE);
  if (status == false) return NULL;

  return client;
}

Step 3

Call initializeCrashpad using your own parameters for the BugSplat dbName, appName, and appVersion.

char *dbName = (char *)"fred";
char *appName = (char *)"myCrashpadCrasher";
char *appVersion = (char *)"1.0";

initializeCrashpad(dbName, appName, appVersion);

Step 4

Link your application with the appropriate version of the Crashpad libraries client.lib, base.lib, andutil.lib. BugSplat supplies builds for Debug/Release (x86) and Debug_x64/Release_x64 versions of the Crashpad libraries.

Step 5

Once you have symbol-upload downloaded or installed, modify the following command to suit your needs.

symbol-upload-windows -b "fred" ^
    -a "myCrashpadCrasher" ^
    -v "1.0" ^
    -u "fred@bugsplat.com" ^
    -p "Flintstone" ^
    -d "C:\\path\\to\\build\\output" ^
    -f "*.{pdb,exe,dll}" ^
    --dumpSyms

Step 6

Trigger a crash in your application. The crash report should be available immediately on the BugSplat website.

Additional Considerations

Databases

Optimizations

Compiler optimizations can cause a mismatch between the line numbers in crash reports and the actual line numbers in your code. BugSplat recommends turning off compiler optimizations to ensure that the line numbers in your crash reports match the line numbers in your code. To turn off optimizations in Visual Studio, right-click your project and navigate to Properties > C/C++ > Optimization > Optimization, and set the value to Disabled (/Od).

You will need to generate and upload .sym files to BugSplat to generate function names and line numbers in the stack traces of your crash reports. BugSplat's tool can be used conveniently to generate and upload .sym files with a single terminal command. Download a copy of symbol-upload from or install it via .

The BugSplat database for your crash reports is created on the page in Settings. Typically, you will create a new database for each major release of your product.

📌
🔀
here
here
download
Building Crashpad
symbol-upload
GitHub
npm
Manage Database