Skip to content

Conversation

@elviscapiaq
Copy link
Collaborator

@elviscapiaq elviscapiaq commented Jan 6, 2026

  • This change implements Crashpad as the primary crash reporting system across all platforms (Linux, Windows, and macOS), replacing the existing absl::crashhandler.
  • Symbol Generation: Developers are now required to install dump_syms via the Rust toolchain or the Linux package manager to generate debug symbols.
  • Symbol Uploads: Added support for uploading symbols to the Crashpad server using curl via PowerShell (Windows) or Bash (macOS/Linux).
  • Distribution: Included the crashpad_handler executable in the Dive UI output directory for both development and release builds.

@elviscapiaq elviscapiaq force-pushed the debug_symbols branch 3 times, most recently from 50a5f6b to 8186325 Compare January 7, 2026 16:51
@elviscapiaq elviscapiaq changed the title Adding breakpad tools Adds Crashpad to Dive UI Jan 7, 2026
@elviscapiaq elviscapiaq force-pushed the debug_symbols branch 11 times, most recently from 13f9f2e to 58afbcc Compare January 12, 2026 21:29
@elviscapiaq elviscapiaq changed the title Adds Crashpad to Dive UI Adds Crashpad support to Dive UI Jan 12, 2026
- This change implements Crashpad as the primary crash reporting system across all platforms
  (Linux, Windows, and macOS), replacing the existing absl::crashhandler.
- Symbol Generation: Developers are now required to install dump_syms via the Rust toolchain
  or the Linux package manager to generate debug symbols.
- Symbol Uploads: Added support for uploading symbols to the Crashpad server using curl via
  PowerShell (Windows) or Bash (macOS/Linux).
- Distribution: Included the crashpad_handler executable in the Dive UI output directory for
  both development and release builds.
- Debug symbols are only generated and uploaded to the Crashpad server for a release build
  (DIVE_RELEASE_TYPE=RelWithDebInfo).
@elviscapiaq
Copy link
Collaborator Author

elviscapiaq commented Jan 12, 2026

Tested on Windows and Linux.

@angela28chen @GrantComm, could you please help me test this PR on macOS? Since I’m guessing the Crashpad path dependencies for macOS, please follow this workflow:

  1. Prepare the build system: cmake . -DDIVE_RELEASE_TYPE=RelWithDebInfo -G "Ninja Multi-Config" -Bbuild
  2. Build the project: ninja -C build -f build-RelWithDebInfo.ninja or cmake --build build --config=RelWithDebInfo

What to verify:

  1. Symbol Generation/Upload: If symbols are successfully generated and uploaded to the server, you should see this message after building the project:
    [SUCCESS] Symbol uploaded and finalized.
  2. Crashpad Initialization: When Dive UI is launched, you should see:
    Crashpad initialization succeeded.

If you don't see these messages, please post the error log here.

On another note, could you also investigate why the Regression_StackOverflow test is failing on macOS with a timeout? My guess is that because crashpad_handler now runs out-of-process, we might need to increase the timeout.

- Android Studio. Make sure to install an SDK and accept the licenses.
- On Linux, set up environment variables for building GFXReconstruct as explained [here](https://github.com/LunarG/gfxreconstruct/blob/dev/BUILD.md#additional-linux-command-linux-prerequisites)
- Note: Use Java 17, because this uses an older version of Gradle.
- dump_syms, which generates debug symbols for release builds, can be installed via the [Rust installer](https://rustup.rs/). Alternatively, on Linux, you can use `sudo apt install cargo`. Once Cargo is set up, run the command `cargo install dump_syms`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not use breakpad's dump_syms? You can list both of them if both version works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not listed that for the following reasons:

  • Linux and macOS: While I successfully built dump_syms from Breakpad, it does not fully support DWARF 4. As a result, function names and line numbers are not translated correctly in the stack trace. However, the Rust version is modern and provides full DWARF 4 support, allowing us to see the missing information.
  • Windows: Building dump_syms from breakpad source is not trivial, as it requires managing several Visual Studio prerequisites.

In any case, I believe the most reliable approach is to use the Rust version or apt for Linux.

@elviscapiaq elviscapiaq marked this pull request as ready for review January 14, 2026 21:38
- Android Studio. Make sure to install an SDK and accept the licenses.
- On Linux, set up environment variables for building GFXReconstruct as explained [here](https://github.com/LunarG/gfxreconstruct/blob/dev/BUILD.md#additional-linux-command-linux-prerequisites)
- Note: Use Java 17, because this uses an older version of Gradle.
- dump_syms, which generates debug symbols for release builds, can be installed via the [Rust installer](https://rustup.rs/). Alternatively, on Linux, you can use `sudo apt install cargo`. Once Cargo is set up, run the command `cargo install dump_syms`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On mac I did:

brew install rust
cargo install dump_syms

@angela28chen
Copy link
Collaborator

What to verify:

  1. Symbol Generation/Upload: If symbols are successfully generated and uploaded to the server, you should see this message after building the project:
    [SUCCESS] Symbol uploaded and finalized.

I got:

17:23:36 [ERROR] A panic occurred at /Users/chenangela/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dump_syms-2.3.5/src/utils.rs:15: Unable to open the file /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/dive.dSYM


chenangela@H:~/src/git/dive$ ls /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/dive.dSYM
ls: /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/dive.dSYM: No such file or directory
chenangela@H:~/src/git/dive$ ls /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/
crashpad_handler	dive			dive.sym		plugins

Also, do I need to set something up with api key?

@elviscapiaq
Copy link
Collaborator Author

What to verify:

  1. Symbol Generation/Upload: If symbols are successfully generated and uploaded to the server, you should see this message after building the project:
    [SUCCESS] Symbol uploaded and finalized.

I got:

17:23:36 [ERROR] A panic occurred at /Users/chenangela/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dump_syms-2.3.5/src/utils.rs:15: Unable to open the file /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/dive.dSYM


chenangela@H:~/src/git/dive$ ls /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/dive.dSYM
ls: /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/dive.dSYM: No such file or directory
chenangela@H:~/src/git/dive$ ls /Users/chenangela/src/git/dive/build/ui/RelWithDebInfo/dive.app/Contents/MacOS/
crashpad_handler	dive			dive.sym		plugins

Also, do I need to set something up with api key?

Thank you so much @angela28chen , it seems the dSYM file was not generated on macOS.
I updated the breakpad_tools.cmake file, hoepfully now that file is generated correctly.

Could you test again please?
You have to create an enviroment variable for CRASHPAD_API_KEY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants