{"id":25836033,"url":"https://github.com/bugsplat-git/my-ubuntu-crasher","last_synced_at":"2025-03-01T01:38:56.931Z","repository":{"id":43084732,"uuid":"271042681","full_name":"BugSplat-Git/my-ubuntu-crasher","owner":"BugSplat-Git","description":"🧐🐛💥 Sample Linux application built using clang and integrated with Crashpad","archived":false,"fork":false,"pushed_at":"2024-09-12T23:10:18.000Z","size":8264,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-09-14T08:58:25.405Z","etag":null,"topics":["bugsplat","clang","crash","crashpad","linux","minidump","reporting","ubuntu"],"latest_commit_sha":null,"homepage":"https://docs.bugsplat.com/introduction/getting-started/integrations/desktop/linux/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BugSplat-Git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-09T15:39:41.000Z","updated_at":"2024-09-12T23:10:19.000Z","dependencies_parsed_at":"2024-09-13T06:18:54.388Z","dependency_job_id":"1641d0b5-f761-4df8-9d9e-fb79c343f38d","html_url":"https://github.com/BugSplat-Git/my-ubuntu-crasher","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-ubuntu-crasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-ubuntu-crasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-ubuntu-crasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fmy-ubuntu-crasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BugSplat-Git","download_url":"https://codeload.github.com/BugSplat-Git/my-ubuntu-crasher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241304300,"owners_count":19941100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bugsplat","clang","crash","crashpad","linux","minidump","reporting","ubuntu"],"created_at":"2025-03-01T01:38:56.420Z","updated_at":"2025-03-01T01:38:56.921Z","avatar_url":"https://github.com/BugSplat-Git.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![bugsplat-github-banner-basic-outline](https://user-images.githubusercontent.com/20464226/149019306-3186103c-5315-4dad-a499-4fd1df408475.png)](https://bugsplat.com)\n\u003cbr/\u003e\n# \u003cdiv align=\"center\"\u003eBugSplat\u003c/div\u003e \n### **\u003cdiv align=\"center\"\u003eCrash and error reporting built for busy developers.\u003c/div\u003e**\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/BugSplatCo\"\u003e\n        \u003cimg alt=\"Follow @bugsplatco on Twitter\" src=\"https://img.shields.io/twitter/follow/bugsplatco?label=Follow%20BugSplat\u0026style=social\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/K4KjjRV5ve\"\u003e\n        \u003cimg alt=\"Join BugSplat on Discord\" src=\"https://img.shields.io/discord/664965194799251487?label=Join%20Discord\u0026logo=Discord\u0026style=social\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n## Introduction 👋\n\nThis sample demonstrates Linux C++ crash reporting with [BugSplat](https://bugsplat.com) and [Crashpad](https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md). The `my-ubuntu-crasher` sample includes a [prebuilt version](https://github.com/BugSplat-Git/my-ubuntu-crasher/tree/main/crashpad/lib) of Crashpad and [symbol-upload](https://github.com/BugSPlat-Git/symbol-upload) to create `.sym` files and upload them to BugSplat.\n\n## Steps 🥾\n\n1. Ensure `git`, `git-lfs`, `llvm`, `build-essential`, and `clang` are installed on your machine\n2. Clone this repository and ensure all files, including git-lfs artifact `symbol-upload-linux` were downloaded correctly\n3. Build main.cpp with debug information and a build ID and link the Crashpad libraries using clang\n\n```bash\nclang++ -pthread $PROJECT_DIR/main.cpp \\\n    $CRASHPAD_DIR/lib/libcommon.a \\\n    $CRASHPAD_DIR/lib/libclient.a \\\n    $CRASHPAD_DIR/lib/libutil.a \\\n    $CRASHPAD_DIR/lib/libbase.a \\\n    -I$CRASHPAD_DIR/include \\\n    -I$CRASHPAD_DIR/include/third_party/mini_chromium/mini_chromium \\\n    -I$CRASHPAD_DIR/include/out/Default/gen \\\n    -o$OUT_DIR/$MODULE_NAME \\\n    -g \\\n    -Wl,--build-id\n```\n\n4. Generate and upload symbols to BugSplat using symbol-upload and the `--dumpSyms` flag\n\n```bash\n$CRASHPAD_DIR/tools/symbol-upload-linux -b $BUGSPLAT_DATABASE \\\n    -a $BUGSPLAT_APP_NAME \\\n    -v $BUGSPLAT_APP_VERSION \\\n    -u $BUGSPLAT_EMAIL \\\n    -p $BUGSPLAT_PASSWORD \\\n    -d $PROJECT_DIR/out \\\n    -f $MODULE_NAME \\\n    --dumpSyms\n```\n\n5. Run the output executable to generate a crash report\n\n```bash\n./out/myUbuntuCrasher\n\n# [10939:10939:20240705,155021.774184:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)\n# [10939:10939:20240705,155021.774253:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)\n# Segmentation fault\n```\n\n7. Log into [BugSplat](https://bugsplat.com) using our public account `fred@bugsplat.com` and password `Flintstone`\n8. Navigate to the [Crashes]([https://app.bugsplat.com/v2/crashes](https://app.bugsplat.com/v2/crashes?c0=appName\u0026f0=CONTAINS\u0026v0=myUbuntuCrasher\u0026database=Fred)) page and click the link in the ID column to see a detailed crash report\n\n\u003cimg width=\"1728\" alt=\"myUbuntuCrasher crash on BugSplat\" src=\"https://github.com/BugSplat-Git/my-ubuntu-crasher/assets/2646053/07c97d9c-29ea-486b-808e-785a6fc2597d\"\u003e\n\n## Other ℹ️\n\nPlease ensure that you increment the version number every time you build and generate/upload new symbol files. If you fail to create and upload symbol files, your crash reports will not contain file names and source line numbers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fmy-ubuntu-crasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugsplat-git%2Fmy-ubuntu-crasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fmy-ubuntu-crasher/lists"}