From 3005172aa55e6871fb6d67ff56f96791ce5841a3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 17 Sep 2019 11:43:01 +0100 Subject: [PATCH] Tweak the phrasing of crash dialog to better explain what happened * In particular make it clear that crashes caught in the injected program may or may not be a RenderDoc bug. Even if we could point the finger to a particular DLL we can't necessarily tie that DLL to the responsibility of either us or the application. --- qrenderdoc/Windows/Dialogs/CrashDialog.cpp | 33 +++++++++++++++++++--- qrenderdoc/Windows/MainWindow.cpp | 1 + 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp index 42bbf3d6a..52753b224 100644 --- a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp @@ -49,7 +49,9 @@ CrashDialog::CrashDialog(PersistantConfig &cfg, QVariantMap crashReportJSON, QWi m_ReportPath = crashReportJSON[lit("report")].toString(); m_ReportMetadata = crashReportJSON; - bool replayCrash = crashReportJSON[lit("replaycrash")].toUInt() != 0; + const bool replayCrash = crashReportJSON[lit("replaycrash")].toUInt() != 0; + const bool manualReport = + crashReportJSON.contains(lit("manual")) && crashReportJSON[lit("manual")].toUInt() != 0; // remove metadata we don't send directly m_ReportMetadata.remove(lit("report")); @@ -119,9 +121,32 @@ CrashDialog::CrashDialog(PersistantConfig &cfg, QVariantMap crashReportJSON, QWi ui->capturePreviewFrame->hide(); } - QString text = - tr("

RenderDoc encountered a serious problem. Please take a moment to look over this " - "form and send it off so that RenderDoc can get better!

"); + QString text; + + if(manualReport) + { + text = + tr("

Thank you for reporting a problem! Please take a moment to look over this " + "form to check what is being sent.

"); + } + else if(replayCrash) + { + text = + tr("

RenderDoc encountered a serious problem. Please take a moment to look over this " + "form to check what has been gathered then send it off so that RenderDoc can get " + "better!

"); + } + else + { + text = + tr("

A crash happened while RenderDoc was injected into your application. It's not " + "feasible to tell whether the crash was in your application or in RenderDoc's capturing " + "code. The minidump in the zip might show the problem.

" + "

If you don't think your application crashed on its own please take a moment to " + "look over this form to check what has been gathered then send it off so that RenderDoc " + "can get better!

") + .arg(QUrl::fromLocalFile(m_ReportPath).toString()); + } if(m_Config.CheckUpdate_UpdateAvailable) { diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp index 6dc0d7994..831ebbeec 100644 --- a/qrenderdoc/Windows/MainWindow.cpp +++ b/qrenderdoc/Windows/MainWindow.cpp @@ -2701,6 +2701,7 @@ void MainWindow::on_action_Send_Error_Report_triggered() json[lit("version")] = lit(FULL_VERSION_STRING); json[lit("gitcommit")] = QString::fromLatin1(RENDERDOC_GetCommitHash()); json[lit("replaycrash")] = 1; + json[lit("manual")] = 1; json[lit("report")] = (QString)report; CrashDialog crash(m_Ctx.Config(), json, this);