Do not allow error reports on fatal error from dev/unoffiical builds

This commit is contained in:
baldurk
2025-06-03 14:20:33 +01:00
parent 95975e29a2
commit 18cb138aa3
3 changed files with 41 additions and 28 deletions
+32 -28
View File
@@ -158,43 +158,47 @@ CaptureContext::CaptureContext(PersistantConfig &cfg) : m_Config(cfg)
bool add_report = false;
if(CrashDialog::HasCaptureReady(m_Config))
if(m_MainWindow->ErrorReportsAllowed())
{
text += tr(
"If you think this may be a RenderDoc bug please click the button below to report it, "
"but note that this will require you to upload the capture for reproduction as "
"otherwise it is impossible to tell what the problem may be.");
add_report = true;
}
else if(CrashDialog::CaptureTooLarge(m_Config))
{
text = tr("<html>%1<br><br>"
"Your capture is too lage to upload as a crash report so this can't be "
"automatically reported. "
"Please email me at <a "
"href=\"mailto:baldurk@baldurk.org?subject=RenderDoc%20Unrecoverable%20error\">"
"baldurk@baldurk.org</a> with information and I can help investigate.</html>")
.arg(text);
}
else
{
text += tr("The capture must be saved locally if you want to report this as a bug. ");
if(Replay().CurrentRemote().IsConnected())
if(CrashDialog::HasCaptureReady(m_Config))
{
text +=
tr("Before closing the capture you can save it to disk and manually report a bug. "
"Please include the capture, or else it will be impossible to tell what the "
"problem may be.");
tr("If you think this may be a RenderDoc bug please click the button below to report "
"it, "
"but note that this will require you to upload the capture for reproduction as "
"otherwise it is impossible to tell what the problem may be.");
add_report = true;
}
else if(CrashDialog::CaptureTooLarge(m_Config))
{
text = tr("<html>%1<br><br>"
"Your capture is too lage to upload as a crash report so this can't be "
"automatically reported. "
"Please email me at <a "
"href=\"mailto:baldurk@baldurk.org?subject=RenderDoc%20Unrecoverable%20error\">"
"baldurk@baldurk.org</a> with information and I can help investigate.</html>")
.arg(text);
}
else
{
text += tr("You will need to reconnect to the remote server to save the capture.");
text += tr("The capture must be saved locally if you want to report this as a bug. ");
if(Replay().CurrentRemote().IsConnected())
{
text +=
tr("Before closing the capture you can save it to disk and manually report a bug. "
"Please include the capture, or else it will be impossible to tell what the "
"problem may be.");
}
else
{
text += tr("You will need to reconnect to the remote server to save the capture.");
}
}
}
QMessageBox mb(QMessageBox::Critical, title, text, QMessageBox::Ok, m_MainWindow);
QMessageBox mb(QMessageBox::Critical, title, text.trimmed(), QMessageBox::Ok, m_MainWindow);
mb.setDefaultButton(QMessageBox::NoButton);
QPushButton *report = NULL;
if(add_report)
+8
View File
@@ -1681,6 +1681,11 @@ void MainWindow::LoadInitialLayout()
}
}
bool MainWindow::ErrorReportsAllowed()
{
return ui->action_Send_Error_Report->isEnabled();
}
void MainWindow::RemoveRecentCapture(const QString &filename)
{
RemoveRecentFile(m_Ctx.Config().RecentCaptureFiles, filename);
@@ -2848,6 +2853,9 @@ void MainWindow::on_action_Send_Error_Report_triggered()
void MainWindow::sendErrorReport(bool forceCaptureInclusion)
{
if(!ErrorReportsAllowed())
return;
rdcstr report;
RENDERDOC_CreateBugReport(RENDERDOC_GetLogFile(), "", report);
+1
View File
@@ -96,6 +96,7 @@ public:
void LoadInitialLayout();
bool ErrorReportsAllowed();
void sendErrorReport(bool forceCaptureInclusion);
void setProgress(float val);