diff --git a/qrenderdoc/Code/CaptureContext.cpp b/qrenderdoc/Code/CaptureContext.cpp index 449300b1e..35d85c619 100644 --- a/qrenderdoc/Code/CaptureContext.cpp +++ b/qrenderdoc/Code/CaptureContext.cpp @@ -160,6 +160,15 @@ CaptureContext::CaptureContext(PersistantConfig &cfg) : m_Config(cfg) add_report = true; } + else if(CrashDialog::CaptureTooLarge(m_Config)) + { + text += + tr("Your capture is too lage to upload as a crash report so this can't be " + "automatically reported. " + "Please email me at " + "baldurk@baldurk.org with information and I can help investigate."); + } else { text += tr("The capture must be saved locally if you want to report this as a bug. "); diff --git a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp index 0df30dc03..6d8c638f2 100644 --- a/qrenderdoc/Windows/Dialogs/CrashDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/CrashDialog.cpp @@ -256,6 +256,13 @@ bool CrashDialog::HasCaptureReady(PersistantConfig &cfg) return capInfo.exists() && capInfo.size() <= MaxUploadSize; } +bool CrashDialog::CaptureTooLarge(PersistantConfig &cfg) +{ + QFileInfo capInfo(cfg.CrashReport_LastOpenedCapture); + + return capInfo.exists() && capInfo.size() > MaxUploadSize; +} + void CrashDialog::showEvent(QShowEvent *) { adjustSize(); @@ -319,6 +326,15 @@ void CrashDialog::on_send_clicked() // uncheck and return back so they can confirm if(ui->captureUpload->isEnabled()) ui->captureUpload->setChecked(false); + else + RDDialog::information( + this, tr("Capture required"), + tr("For unrecoverable errors like the one you encountered, without a " + "capture to reproduce the problem it's impossible to tell what " + "went wrong so a crash report is unfortunately required.\n\n" + "If you don't wish to share your capture that is OK. You can also email me at " + "baldurk@baldurk.org with information and I can help investigate.")); return; } } diff --git a/qrenderdoc/Windows/Dialogs/CrashDialog.h b/qrenderdoc/Windows/Dialogs/CrashDialog.h index ef1edd8e0..f5b8e05ac 100644 --- a/qrenderdoc/Windows/Dialogs/CrashDialog.h +++ b/qrenderdoc/Windows/Dialogs/CrashDialog.h @@ -47,6 +47,7 @@ public: ~CrashDialog(); static bool HasCaptureReady(PersistantConfig &cfg); + static bool CaptureTooLarge(PersistantConfig &cfg); private slots: // automatic slots diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp index 44acdd046..0795d062f 100644 --- a/renderdoc/driver/d3d11/d3d11_device.cpp +++ b/renderdoc/driver/d3d11/d3d11_device.cpp @@ -2528,8 +2528,7 @@ void WrappedID3D11Device::CheckHRESULT(HRESULT hr) return; if(hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET || - hr == DXGI_ERROR_DEVICE_HUNG || hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR || - hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR) + hr == DXGI_ERROR_DEVICE_HUNG || hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR) { RDCLOG("Logging device lost fatal error for %s", ToStr(hr).c_str()); m_FatalError = ReplayStatus::ReplayDeviceLost; diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index ed965d6a9..b540bde86 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -3022,8 +3022,7 @@ void WrappedID3D12Device::CheckHRESULT(HRESULT hr) return; if(hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET || - hr == DXGI_ERROR_DEVICE_HUNG || hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR || - hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR) + hr == DXGI_ERROR_DEVICE_HUNG || hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR) { RDCLOG("Logging device lost fatal error for %s", ToStr(hr).c_str()); m_FatalError = ReplayStatus::ReplayDeviceLost; diff --git a/renderdoc/driver/dxgi/dxgi_stringise.cpp b/renderdoc/driver/dxgi/dxgi_stringise.cpp index 8482cb421..91f600400 100644 --- a/renderdoc/driver/dxgi/dxgi_stringise.cpp +++ b/renderdoc/driver/dxgi/dxgi_stringise.cpp @@ -217,6 +217,7 @@ rdcstr DoStringise(const long &el) STRINGISE_ENUM(DXGI_ERROR_WAS_STILL_DRAWING) STRINGISE_ENUM(DXGI_ERROR_UNSUPPORTED) STRINGISE_ENUM(DXGI_ERROR_ACCESS_DENIED) + STRINGISE_ENUM(DXGI_ERROR_DRIVER_INTERNAL_ERROR) STRINGISE_ENUM(E_OUTOFMEMORY) STRINGISE_ENUM(E_INVALIDARG) STRINGISE_ENUM(E_NOINTERFACE)