From feab5e89367d3028c7ce8238db25a98b11434a6d Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 21 Mar 2021 00:21:20 +1100 Subject: [PATCH] package crashpad symbols with app and use them --- .github/workflows/ci.yml | 26 ++++++++++-------------- app/dialog/crashhandler/crashhandler.cpp | 8 +++----- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e120e18fa..c772c231c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -212,6 +212,17 @@ jobs: cp $(cygpath $GITHUB_WORKSPACE)/out/Default/crashpad_handler.exe olive-editor cp $(cygpath $GITHUB_WORKSPACE)/breakpad/bin/* olive-editor + - name: Export Crashpad symbols + working-directory: ${{ runner.workspace }}/build + shell: bash + run: | + $DOWNLOAD_TOOL https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true + ./dump_syms app/olive-editor.pdb > olive-editor.sym + SYM_HEADER=($(head -n 1 olive-editor.sym)) # Read first line of symbol file + SYM_DIR=olive-editor/symbols/olive-editor.pdb/${SYM_HEADER[3]} + mkdir -p "$SYM_DIR" + mv olive-editor.sym "$SYM_DIR" + - name: Deploy Packages working-directory: ${{ runner.workspace }}/build shell: bash @@ -261,21 +272,6 @@ jobs: -F comment="$(git -C $GITHUB_WORKSPACE show -s --format=%B)" \ https://ci.olivevideoeditor.org/push.php - - name: Export Crashpad Symbols and Upload To Server - working-directory: ${{ runner.workspace }}/build - shell: bash - env: - GH_AUTH_KEY: ${{ secrets.GH_AUTH_KEY }} - if: github.event_name == 'push' - run: | - curl -fLSs --retry 2 --retry-delay 60 \ - https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true > dump_syms.exe - ./dump_syms app/olive-editor.pdb > olive-editor.sym - curl -X POST \ - -F symfile=@olive-editor.sym \ - -F key="$GH_AUTH_KEY" \ - https://olivevideoeditor.org/crashpad/symbols.php - macos: strategy: matrix: diff --git a/app/dialog/crashhandler/crashhandler.cpp b/app/dialog/crashhandler/crashhandler.cpp index 61f8c276b..87e93cbb8 100644 --- a/app/dialog/crashhandler/crashhandler.cpp +++ b/app/dialog/crashhandler/crashhandler.cpp @@ -102,16 +102,14 @@ void CrashHandlerDialog::GenerateReport() this, &CrashHandlerDialog::ReadProcessFinished); connect(p, &QProcess::readyReadStandardOutput, this, &CrashHandlerDialog::ReadProcessHasData); - QString stackwalk_filename; + QString stackwalk_filename = QStringLiteral("minidump_stackwalk"); #if defined(OS_WIN) - stackwalk_filename = QStringLiteral("minidump_stackwalk.exe"); -#else - stackwalk_filename = QStringLiteral("minidump_stackwalk"); + stackwalk_filename.append(QStringLiteral(".exe")); #endif QString stackwalk_bin = QDir(qApp->applicationDirPath()).filePath(stackwalk_filename); - p->start(stackwalk_bin, {report_filename_}); + p->start(stackwalk_bin, {report_filename_, QDir(qApp->applicationDirPath()).filePath(QStringLiteral("symbols"))}); crash_report_->setText(QStringLiteral("Trying to run: %1").arg(stackwalk_bin)); }