Skip to content

BugSplat-Git/my-qt-crasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

bugsplat-github-banner-basic-outline

BugSplat

Crash and error reporting built for busy developers.

πŸ‘‹ Introduction

This sample demonstrates cross-platform crash reporting with BugSplat, Crashpad, and Qt. Additionally, my-qt-crasher uses symbol-upload to generate symbol files and upload them to BugSplat

For more information about how to configure Crashpad in your Qt application please see the BugSplat docs.

πŸ“‹ Steps

  1. Download and install Qt Creator
  2. Open myQtCrasher.pro
  3. Build > Run to run without the debugger attached
  4. Click the button to generate a crash report
  5. Log into BugSplat using our public account fred@bugsplat.com and the password Flintstone
  6. Click the link in the ID column on the Crashes page to see detailed information similar to what you would see in your debugger

Crashes Page BugSplat Crashes Page

Crash Page BugSplat Crash Page

Windows

When building your Qt project you may encounter Il mismatch between 'P1' version 'x' and 'P2' version 'y'. This is due to Qt building with a different toolchain than the Crashpad libraries. To workaround the Il mismatch issue, build Crashpad specifying /GL- for extra_cflags. When Crashpad is built with different minor versions of MSVC specifying /GL- usually fixes the problem. However, if the linker complains about unresolved symbols after specifying /GL- you will need to ensure you're building with the same major version of MSVC. The pre-built Crashpad libraries included in this sample are built with MSVC 17 (2022).

macOS

You will need to link with the correct libraries and load the correct version of crashpad_handler at runtime depending on if your build is targeting x86_64 or arm64 (M1) macOS systems. In myQtCrasher.pro there is an variable that you can uncomment that will allow you to build for arm64 macOS systems.

Attachments

BugSplat has created a Crashpad fork that adds support for attachments to macOS. This project uses pre-built binaries from the forked version of Crashpad to demonstrate attachment support on macOS. If attachment support on macOS is a requirement for your project, you can use the pre-built libraries from this repo, or build the Crashpad libraries yourself from the code in our forked repo.

Additional Considerations

If you change the BugSplat database, application, or version values in main.cpp, be sure to update the corresponding variables in the myQtCrasher.pro file. The symbols.sh scripts are responsible for running symbol-upload on macOS and Linux. Likewise, symbols.bat is responsible for running symbol-upload on Windows. If the values passed to symbols.sh or symbols.bat via the QMAKE_POST_LINK command are wrong then you will not see file names or line numbers in your crash reports.

πŸ‘· Support

If you have any additional questions, please email our support team, join us on Discord, or reach out via the chat in our web application.