From 1357b3f84feeba9724068a287f5c83b076d722ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:56:29 +0200 Subject: [PATCH 1/4] chore(deps): update Cocoa SDK (iOS and Mac) to v8.42.0 (#716) * chore: update modules/sentry-cocoa.properties to 8.42.0 * Update snapshot --------- Co-authored-by: GitHub Co-authored-by: Ivan Tustanivskyi --- CHANGELOG.md | 3 +++ modules/sentry-cocoa.properties | 2 +- scripts/packaging/package-github.snapshot | 22 +++++++++++++++++++ .../packaging/package-marketplace.snapshot | 22 +++++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25d07082..d4e45b31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - Bump Java SDK (Android) from v7.18.1 to v7.19.0 ([#709](https://github.com/getsentry/sentry-unreal/pull/709)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7190) - [diff](https://github.com/getsentry/sentry-java/compare/7.18.1...7.19.0) +- Bump Cocoa SDK (iOS and Mac) from v8.41.0 to v8.42.0 ([#716](https://github.com/getsentry/sentry-unreal/pull/716)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8420) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.41.0...8.42.0) ## 0.21.1 diff --git a/modules/sentry-cocoa.properties b/modules/sentry-cocoa.properties index 1ee4aa37..531d47d6 100644 --- a/modules/sentry-cocoa.properties +++ b/modules/sentry-cocoa.properties @@ -1,2 +1,2 @@ -version=8.41.0 +version=8.42.0 repo=https://github.com/getsentry/sentry-cocoa diff --git a/scripts/packaging/package-github.snapshot b/scripts/packaging/package-github.snapshot index 64d9b7ed..9e90ba26 100644 --- a/scripts/packaging/package-github.snapshot +++ b/scripts/packaging/package-github.snapshot @@ -288,12 +288,20 @@ Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/PrivatesHeader.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryAppStartMeasurement.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryAsynchronousOperation.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryAutoSessionTrackingIntegration.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryBaseIntegration.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryBinaryImageCache.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryBreadcrumb+Private.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryCrashInstallationReporter.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryCrashReportConverter.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryCrashReportSink.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryDateUtils.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryDebugImageProvider+HybridSDKs.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryDependencyContainer.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryEnvelope.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryEnvelopeItemType.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryFormatter.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryFramesTracker.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryInternalSerializable.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryLog.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryNSDataUtils.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryNSDictionarySanitize.h @@ -304,7 +312,10 @@ Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryScreenFrames.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySDK+Private.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySdkInfo.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySessionReplayIntegration-Hybrid.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySessionReplayIntegration.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySwift.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySwizzle.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryUser+Private.h Source/ThirdParty/IOS/Sentry.framework/Sentry Source/ThirdParty/Linux/ Source/ThirdParty/Linux/bin/ @@ -350,7 +361,10 @@ Source/ThirdParty/Mac/include/Sentry/SentryAsynchronousOperation.h Source/ThirdParty/Mac/include/Sentry/SentryAttachment.h Source/ThirdParty/Mac/include/Sentry/SentryAutoSessionTrackingIntegration.h Source/ThirdParty/Mac/include/Sentry/SentryBaggage.h +Source/ThirdParty/Mac/include/Sentry/SentryBaseIntegration.h +Source/ThirdParty/Mac/include/Sentry/SentryBinaryImageCache.h Source/ThirdParty/Mac/include/Sentry/SentryBreadcrumb.h +Source/ThirdParty/Mac/include/Sentry/SentryBreadcrumb+Private.h Source/ThirdParty/Mac/include/Sentry/SentryClient.h Source/ThirdParty/Mac/include/Sentry/SentryCrashExceptionApplication.h Source/ThirdParty/Mac/include/Sentry/SentryCrashInstallationReporter.h @@ -358,8 +372,10 @@ Source/ThirdParty/Mac/include/Sentry/SentryCrashReportConverter.h Source/ThirdParty/Mac/include/Sentry/SentryCrashReportSink.h Source/ThirdParty/Mac/include/Sentry/SentryDateUtils.h Source/ThirdParty/Mac/include/Sentry/SentryDebugImageProvider.h +Source/ThirdParty/Mac/include/Sentry/SentryDebugImageProvider+HybridSDKs.h Source/ThirdParty/Mac/include/Sentry/SentryDebugMeta.h Source/ThirdParty/Mac/include/Sentry/SentryDefines.h +Source/ThirdParty/Mac/include/Sentry/SentryDependencyContainer.h Source/ThirdParty/Mac/include/Sentry/SentryDsn.h Source/ThirdParty/Mac/include/Sentry/SentryEnvelope.h Source/ThirdParty/Mac/include/Sentry/SentryEnvelopeItemHeader.h @@ -367,10 +383,13 @@ Source/ThirdParty/Mac/include/Sentry/SentryEnvelopeItemType.h Source/ThirdParty/Mac/include/Sentry/SentryError.h Source/ThirdParty/Mac/include/Sentry/SentryEvent.h Source/ThirdParty/Mac/include/Sentry/SentryException.h +Source/ThirdParty/Mac/include/Sentry/SentryFormatter.h Source/ThirdParty/Mac/include/Sentry/SentryFrame.h +Source/ThirdParty/Mac/include/Sentry/SentryFramesTracker.h Source/ThirdParty/Mac/include/Sentry/SentryGeo.h Source/ThirdParty/Mac/include/Sentry/SentryHttpStatusCodeRange.h Source/ThirdParty/Mac/include/Sentry/SentryHub.h +Source/ThirdParty/Mac/include/Sentry/SentryInternalSerializable.h Source/ThirdParty/Mac/include/Sentry/SentryLog.h Source/ThirdParty/Mac/include/Sentry/SentryMeasurementUnit.h Source/ThirdParty/Mac/include/Sentry/SentryMechanism.h @@ -395,17 +414,20 @@ Source/ThirdParty/Mac/include/Sentry/SentrySDK+Private.h Source/ThirdParty/Mac/include/Sentry/SentrySdkInfo.h Source/ThirdParty/Mac/include/Sentry/SentrySerializable.h Source/ThirdParty/Mac/include/Sentry/SentrySessionReplayIntegration-Hybrid.h +Source/ThirdParty/Mac/include/Sentry/SentrySessionReplayIntegration.h Source/ThirdParty/Mac/include/Sentry/SentrySpanContext.h Source/ThirdParty/Mac/include/Sentry/SentrySpanId.h Source/ThirdParty/Mac/include/Sentry/SentrySpanProtocol.h Source/ThirdParty/Mac/include/Sentry/SentrySpanStatus.h Source/ThirdParty/Mac/include/Sentry/SentryStacktrace.h Source/ThirdParty/Mac/include/Sentry/SentrySwift.h +Source/ThirdParty/Mac/include/Sentry/SentrySwizzle.h Source/ThirdParty/Mac/include/Sentry/SentryThread.h Source/ThirdParty/Mac/include/Sentry/SentryTraceContext.h Source/ThirdParty/Mac/include/Sentry/SentryTraceHeader.h Source/ThirdParty/Mac/include/Sentry/SentryTransactionContext.h Source/ThirdParty/Mac/include/Sentry/SentryUser.h +Source/ThirdParty/Mac/include/Sentry/SentryUser+Private.h Source/ThirdParty/Mac/include/Sentry/SentryUserFeedback.h Source/ThirdParty/Mac/include/Sentry/SentryWithoutUIKit.h Source/ThirdParty/Win64/ diff --git a/scripts/packaging/package-marketplace.snapshot b/scripts/packaging/package-marketplace.snapshot index 8b00dadf..7975b934 100644 --- a/scripts/packaging/package-marketplace.snapshot +++ b/scripts/packaging/package-marketplace.snapshot @@ -285,12 +285,20 @@ Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/PrivatesHeader.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryAppStartMeasurement.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryAsynchronousOperation.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryAutoSessionTrackingIntegration.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryBaseIntegration.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryBinaryImageCache.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryBreadcrumb+Private.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryCrashInstallationReporter.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryCrashReportConverter.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryCrashReportSink.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryDateUtils.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryDebugImageProvider+HybridSDKs.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryDependencyContainer.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryEnvelope.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryEnvelopeItemType.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryFormatter.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryFramesTracker.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryInternalSerializable.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryLog.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryNSDataUtils.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryNSDictionarySanitize.h @@ -301,7 +309,10 @@ Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryScreenFrames.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySDK+Private.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySdkInfo.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySessionReplayIntegration-Hybrid.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySessionReplayIntegration.h Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySwift.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySwizzle.h +Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryUser+Private.h Source/ThirdParty/IOS/Sentry.framework/Sentry Source/ThirdParty/Linux/ Source/ThirdParty/Linux/bin/ @@ -347,7 +358,10 @@ Source/ThirdParty/Mac/include/Sentry/SentryAsynchronousOperation.h Source/ThirdParty/Mac/include/Sentry/SentryAttachment.h Source/ThirdParty/Mac/include/Sentry/SentryAutoSessionTrackingIntegration.h Source/ThirdParty/Mac/include/Sentry/SentryBaggage.h +Source/ThirdParty/Mac/include/Sentry/SentryBaseIntegration.h +Source/ThirdParty/Mac/include/Sentry/SentryBinaryImageCache.h Source/ThirdParty/Mac/include/Sentry/SentryBreadcrumb.h +Source/ThirdParty/Mac/include/Sentry/SentryBreadcrumb+Private.h Source/ThirdParty/Mac/include/Sentry/SentryClient.h Source/ThirdParty/Mac/include/Sentry/SentryCrashExceptionApplication.h Source/ThirdParty/Mac/include/Sentry/SentryCrashInstallationReporter.h @@ -355,8 +369,10 @@ Source/ThirdParty/Mac/include/Sentry/SentryCrashReportConverter.h Source/ThirdParty/Mac/include/Sentry/SentryCrashReportSink.h Source/ThirdParty/Mac/include/Sentry/SentryDateUtils.h Source/ThirdParty/Mac/include/Sentry/SentryDebugImageProvider.h +Source/ThirdParty/Mac/include/Sentry/SentryDebugImageProvider+HybridSDKs.h Source/ThirdParty/Mac/include/Sentry/SentryDebugMeta.h Source/ThirdParty/Mac/include/Sentry/SentryDefines.h +Source/ThirdParty/Mac/include/Sentry/SentryDependencyContainer.h Source/ThirdParty/Mac/include/Sentry/SentryDsn.h Source/ThirdParty/Mac/include/Sentry/SentryEnvelope.h Source/ThirdParty/Mac/include/Sentry/SentryEnvelopeItemHeader.h @@ -364,10 +380,13 @@ Source/ThirdParty/Mac/include/Sentry/SentryEnvelopeItemType.h Source/ThirdParty/Mac/include/Sentry/SentryError.h Source/ThirdParty/Mac/include/Sentry/SentryEvent.h Source/ThirdParty/Mac/include/Sentry/SentryException.h +Source/ThirdParty/Mac/include/Sentry/SentryFormatter.h Source/ThirdParty/Mac/include/Sentry/SentryFrame.h +Source/ThirdParty/Mac/include/Sentry/SentryFramesTracker.h Source/ThirdParty/Mac/include/Sentry/SentryGeo.h Source/ThirdParty/Mac/include/Sentry/SentryHttpStatusCodeRange.h Source/ThirdParty/Mac/include/Sentry/SentryHub.h +Source/ThirdParty/Mac/include/Sentry/SentryInternalSerializable.h Source/ThirdParty/Mac/include/Sentry/SentryLog.h Source/ThirdParty/Mac/include/Sentry/SentryMeasurementUnit.h Source/ThirdParty/Mac/include/Sentry/SentryMechanism.h @@ -392,17 +411,20 @@ Source/ThirdParty/Mac/include/Sentry/SentrySDK+Private.h Source/ThirdParty/Mac/include/Sentry/SentrySdkInfo.h Source/ThirdParty/Mac/include/Sentry/SentrySerializable.h Source/ThirdParty/Mac/include/Sentry/SentrySessionReplayIntegration-Hybrid.h +Source/ThirdParty/Mac/include/Sentry/SentrySessionReplayIntegration.h Source/ThirdParty/Mac/include/Sentry/SentrySpanContext.h Source/ThirdParty/Mac/include/Sentry/SentrySpanId.h Source/ThirdParty/Mac/include/Sentry/SentrySpanProtocol.h Source/ThirdParty/Mac/include/Sentry/SentrySpanStatus.h Source/ThirdParty/Mac/include/Sentry/SentryStacktrace.h Source/ThirdParty/Mac/include/Sentry/SentrySwift.h +Source/ThirdParty/Mac/include/Sentry/SentrySwizzle.h Source/ThirdParty/Mac/include/Sentry/SentryThread.h Source/ThirdParty/Mac/include/Sentry/SentryTraceContext.h Source/ThirdParty/Mac/include/Sentry/SentryTraceHeader.h Source/ThirdParty/Mac/include/Sentry/SentryTransactionContext.h Source/ThirdParty/Mac/include/Sentry/SentryUser.h +Source/ThirdParty/Mac/include/Sentry/SentryUser+Private.h Source/ThirdParty/Mac/include/Sentry/SentryUserFeedback.h Source/ThirdParty/Mac/include/Sentry/SentryWithoutUIKit.h Source/ThirdParty/Win64/ From 5301f56c1dededef71298a6c382f47388c141cc8 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 20 Dec 2024 11:59:50 +0200 Subject: [PATCH 2/4] Add UE 5.5 support to CI pipeline (#713) * Add UE 5.5 support to CI pipeline * Try chown USD plugin * Update ci.yml * chown --- .github/workflows/ci.yml | 6 ++++-- scripts/packaging/engine-versions.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b61e51f0..d2666ea9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: fail-fast: false matrix: # Note: these versions must match scripts/packaging/engine-versions.txt - unreal: ['4.27', '5.0', '5.1', '5.2', '5.3', '5.4'] + unreal: ['4.27', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5'] app: ['sample'] steps: @@ -207,8 +207,10 @@ jobs: docker exec --user root unreal bash -c " chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/Mono/Linux ; chown -R $uid /home/ue4/UnrealEngine/Engine/${{ matrix.unreal == '4.27' && 'Programs/UnrealPak/Saved' || 'Binaries/ThirdParty/DotNet' }} ; + chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/USD/UsdResources/Linux ; mkdir -p /home/ue4/UnrealEngine/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Epic ; - mkdir -p /home/ue4/UnrealEngine/Engine/Source/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Engine/Source/Epic " + mkdir -p /home/ue4/UnrealEngine/Engine/Source/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Engine/Source/Epic ; + mkdir -p /home/ue4/UnrealEngine/Engine/Intermediate/Build/BuildCookRun && chown -R $uid /home/ue4/UnrealEngine/Engine/Intermediate/Build/BuildCookRun " - name: Setup C++ runtime run: docker exec --user root unreal bash -c ' diff --git a/scripts/packaging/engine-versions.txt b/scripts/packaging/engine-versions.txt index 58c3c15f..1758368c 100644 --- a/scripts/packaging/engine-versions.txt +++ b/scripts/packaging/engine-versions.txt @@ -1,3 +1,4 @@ +5.5 5.4 5.3 5.2 From 547d542e540530a8ac36332303b3dae1f5c8c18e Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 20 Dec 2024 12:27:39 +0200 Subject: [PATCH 3/4] Add GPU crash dump attachments (#712) * Add GPU crash dump attachment for desktop * Fix gpu dump path * Fix tooltip * Update changelog * Fix build errors on Linux --- CHANGELOG.md | 4 +++ .../Desktop/SentrySubsystemDesktop.cpp | 28 +++++++++++++++++++ .../Private/Desktop/SentrySubsystemDesktop.h | 2 ++ .../Source/Sentry/Private/SentrySettings.cpp | 1 + .../Sentry/Private/Utils/SentryFileUtils.cpp | 23 ++++++++++++++- .../Sentry/Private/Utils/SentryFileUtils.h | 1 + .../Source/Sentry/Public/SentrySettings.h | 4 +++ 7 files changed, 62 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4e45b31..81a83fd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Features + +- Add GPU crash dump attachments ([#712](https://github.com/getsentry/sentry-unreal/pull/712)) + ### Dependencies - Bump Native SDK from v0.7.16 to v0.7.17 ([#717](https://github.com/getsentry/sentry-unreal/pull/717)) diff --git a/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.cpp b/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.cpp index 4b45ab7d..6054f9f4 100644 --- a/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.cpp +++ b/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.cpp @@ -18,6 +18,7 @@ #include "SentryTraceSampler.h" +#include "Utils/SentryFileUtils.h" #include "Utils/SentryLogUtils.h" #include "Utils/SentryScreenshotUtils.h" @@ -41,8 +42,11 @@ #if PLATFORM_WINDOWS #include "Windows/WindowsPlatformMisc.h" +#include "Windows/WindowsPlatformCrashContext.h" #endif +extern CORE_API bool GIsGPUCrashed; + #if USE_SENTRY_NATIVE void PrintVerboseLog(sentry_level_t level, const char *message, va_list args, void *userdata) @@ -135,6 +139,11 @@ sentry_value_t HandleBeforeCrash(const sentry_ucontext_t *uctx, sentry_value_t e SentrySubsystemDesktop* SentrySubsystem = static_cast(closure); SentrySubsystem->TryCaptureScreenshot(); + if (GIsGPUCrashed) + { + IFileManager::Get().Copy(*SentrySubsystem->GetGpuDumpBackupPath(), *SentryFileUtils::GetGpuDumpPath()); + } + FSentryCrashContext::Get()->Apply(SentrySubsystem->GetCurrentScope()); TSharedPtr eventDesktop = MakeShareable(new SentryEventDesktop(event, true)); @@ -219,6 +228,15 @@ void SentrySubsystemDesktop::InitWithSettings(const USentrySettings* settings, U #endif } + if (settings->AttachGpuDump) + { +#if PLATFORM_WINDOWS + sentry_options_add_attachmentw(options, *GetGpuDumpBackupPath()); +#elif PLATFORM_LINUX + sentry_options_add_attachment(options, TCHAR_TO_UTF8(*GetGpuDumpBackupPath())); +#endif + } + if(settings->UseProxy) { sentry_options_set_http_proxy(options, TCHAR_TO_ANSI(*settings->ProxyUrl)); @@ -562,6 +580,16 @@ void SentrySubsystemDesktop::TryCaptureScreenshot() const SentryScreenshotUtils::CaptureScreenshot(GetScreenshotPath()); } +FString SentrySubsystemDesktop::GetGpuDumpBackupPath() const +{ + static const FString DateTimeString = FDateTime::Now().ToString(); + + const FString GpuDumpPath = FPaths::Combine(GetDatabasePath(), TEXT("gpudumps"), *FString::Printf(TEXT("UEAftermath-%s.nv-gpudmp"), *DateTimeString));; + const FString GpuDumpFullPath = FPaths::ConvertRelativePathToFull(GpuDumpPath); + + return GpuDumpFullPath; +} + TSharedPtr SentrySubsystemDesktop::GetCurrentScope() { if(scopeStack.Num() == 0) diff --git a/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.h b/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.h index d2269c99..c41a42a4 100644 --- a/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.h +++ b/plugin-dev/Source/Sentry/Private/Desktop/SentrySubsystemDesktop.h @@ -49,6 +49,8 @@ class SentrySubsystemDesktop : public ISentrySubsystem void TryCaptureScreenshot() const; + FString GetGpuDumpBackupPath() const; + TSharedPtr GetCurrentScope(); private: diff --git a/plugin-dev/Source/Sentry/Private/SentrySettings.cpp b/plugin-dev/Source/Sentry/Private/SentrySettings.cpp index 10f1a715..26fb1011 100644 --- a/plugin-dev/Source/Sentry/Private/SentrySettings.cpp +++ b/plugin-dev/Source/Sentry/Private/SentrySettings.cpp @@ -20,6 +20,7 @@ USentrySettings::USentrySettings(const FObjectInitializer& ObjectInitializer) , AttachStacktrace(true) , SendDefaultPii(false) , AttachScreenshot(false) + , AttachGpuDump(true) , MaxBreadcrumbs(100) , EnableAutoSessionTracking(true) , SessionTimeout(30000) diff --git a/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.cpp b/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.cpp index 33e103d7..1782168e 100644 --- a/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.cpp +++ b/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.cpp @@ -42,4 +42,25 @@ FString SentryFileUtils::GetGameLogBackupPath() GameLogBackupFiles.Sort(FSentrySortFileByDatePredicate()); return GameLogBackupFiles[0]; -} \ No newline at end of file +} + +FString SentryFileUtils::GetGpuDumpPath() +{ + TArray GpuDumpFiles; + IFileManager::Get().FindFiles(GpuDumpFiles, *FString::Printf(TEXT("%s*.nv-gpudmp"), *FPaths::ProjectLogDir()), true, false); + + if (GpuDumpFiles.Num() == 0) + { + UE_LOG(LogSentrySdk, Log, TEXT("There is no GPU dump file available.")); + return FString(""); + } + + if (GpuDumpFiles.Num() > 1) + { + // By default, engine should handle clean up of GPU dumps from the previous runs + UE_LOG(LogSentrySdk, Log, TEXT("There are multiple GPU dump files, can't determine reliably which one to pick.")); + return FString(""); + } + + return IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*(FPaths::ProjectLogDir() / GpuDumpFiles[0])); +} diff --git a/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.h b/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.h index 9f5d2fe0..142e911a 100644 --- a/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.h +++ b/plugin-dev/Source/Sentry/Private/Utils/SentryFileUtils.h @@ -9,4 +9,5 @@ class SentryFileUtils public: static FString GetGameLogPath(); static FString GetGameLogBackupPath(); + static FString GetGpuDumpPath(); }; \ No newline at end of file diff --git a/plugin-dev/Source/Sentry/Public/SentrySettings.h b/plugin-dev/Source/Sentry/Public/SentrySettings.h index 9dc921e3..6c8f502f 100644 --- a/plugin-dev/Source/Sentry/Public/SentrySettings.h +++ b/plugin-dev/Source/Sentry/Public/SentrySettings.h @@ -242,6 +242,10 @@ class SENTRY_API USentrySettings : public UObject Meta = (DisplayName = "Attach screenshots", ToolTip = "Flag indicating whether to attach screenshot of the application when an error occurs. Currently this feature is supported for Windows and Linux only.")) bool AttachScreenshot; + UPROPERTY(Config, EditAnywhere, Category = "General|Attachments", + Meta = (DisplayName = "Attach GPU dump", ToolTip = "Flag indicating whether to attach GPU crash dump when an error occurs. Currently this feature is supported for Nvidia graphics only.")) + bool AttachGpuDump; + UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "General|Breadcrumbs", Meta = (DisplayName = "Max breadcrumbs", Tooltip = "Total amount of breadcrumbs that should be captured.")) int32 MaxBreadcrumbs; From 049e516b238f24642001840da6654f85dd341a8b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:34:28 +0200 Subject: [PATCH 4/4] chore: update modules/sentry-cocoa.properties to 8.42.1 (#719) Co-authored-by: GitHub --- CHANGELOG.md | 3 +++ modules/sentry-cocoa.properties | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81a83fd0..87c330f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - Bump Cocoa SDK (iOS and Mac) from v8.41.0 to v8.42.0 ([#716](https://github.com/getsentry/sentry-unreal/pull/716)) - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8420) - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.41.0...8.42.0) +- Bump Cocoa SDK (iOS and Mac) from v8.42.0 to v8.42.1 ([#719](https://github.com/getsentry/sentry-unreal/pull/719)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8421) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.42.0...8.42.1) ## 0.21.1 diff --git a/modules/sentry-cocoa.properties b/modules/sentry-cocoa.properties index 531d47d6..f71e5db0 100644 --- a/modules/sentry-cocoa.properties +++ b/modules/sentry-cocoa.properties @@ -1,2 +1,2 @@ -version=8.42.0 +version=8.42.1 repo=https://github.com/getsentry/sentry-cocoa