diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51d1d28b7..e7a55334a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,17 @@ jobs: env: ARCH: x86_64 run: | + # Create install tree cmake --install app --prefix appdir/usr + + # Dump Crashpad symbols + dump_syms app/olive-editor > olive-editor.sym + SYM_HEADER=($(head -n 1 olive-editor.sym)) # Read first line of symbol file + SYM_DIR=appdir/usr/share/olive-editor/symbols/olive-editor/${SYM_HEADER[3]} + mkdir -p "$SYM_DIR" + mv olive-editor.sym "$SYM_DIR" + + # Package AppImage VERSION=${GITHUB_SHA::8} export VERSION /usr/local/linuxdeployqt-x86_64.AppImage \ diff --git a/app/common/crashpadinterface.cpp b/app/common/crashpadinterface.cpp index 6014bd493..735d8d3ab 100644 --- a/app/common/crashpadinterface.cpp +++ b/app/common/crashpadinterface.cpp @@ -71,13 +71,11 @@ bool LinuxExceptionHandler(int, siginfo_t*, ucontext_t*) bool InitializeCrashpad() { - QString handler_fn; + QString handler_fn = QStringLiteral("crashpad_handler");; // Determine filename of handler from platform #ifdef OS_WIN - handler_fn = QStringLiteral("crashpad_handler.exe"); -#else - handler_fn = QStringLiteral("crashpad_handler"); + handler_fn.append(QStringLiteral(".exe")); #endif // Generate absolute path diff --git a/app/dialog/crashhandler/crashhandler.cpp b/app/dialog/crashhandler/crashhandler.cpp index 1644dd5de..a30fe6bdb 100644 --- a/app/dialog/crashhandler/crashhandler.cpp +++ b/app/dialog/crashhandler/crashhandler.cpp @@ -115,15 +115,20 @@ void CrashHandlerDialog::GenerateReport() this, &CrashHandlerDialog::ReadProcessFinished); connect(p, &QProcess::readyReadStandardOutput, this, &CrashHandlerDialog::ReadProcessHasData); + QDir app_path(qApp->applicationDirPath()); + QString stackwalk_bin = app_path.filePath(stackwalk_filename); + QString stackwalk_filename = QStringLiteral("minidump_stackwalk"); + QString symbols_path; #if defined(OS_WIN) stackwalk_filename.append(QStringLiteral(".exe")); + symbols_path = app_path.filePath(QStringLiteral("symbols")); +#elif defined(Q_OS_LINUX) + symbols_path = app_path.filePath(QStringLiteral("../share/olive-editor/symbols")); #endif - QDir app_path(qApp->applicationDirPath()); - QString stackwalk_bin = app_path.filePath(stackwalk_filename); - p->start(stackwalk_bin, {report_filename_, app_path.filePath(QStringLiteral("symbols"))}); + p->start(stackwalk_bin, {report_filename_, symbols_path}); crash_report_->setText(QStringLiteral("Trying to run: %1").arg(stackwalk_bin)); }