Skip to content

Conversation

tustanivsky
Copy link
Collaborator

This PR fixes an issue where the SDK would still attempt to capture a screenshot during an assert or crash even after Sentry was disabled at runtime.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Screenshot Capture Ignores Sentry Status

The CaptureEnsure method captures and uploads screenshots based only on isScreenshotAttachmentEnabled. It doesn't verify if Sentry is enabled, meaning screenshots are still processed even after Sentry is disabled at runtime. This differs from the system error handler's logic in InitWithSettings.

plugin-dev/Source/Sentry/Private/Mac/MacSentrySubsystem.cpp#L44-L49

if (isScreenshotAttachmentEnabled)
{
const FString& screenshotPath = TryCaptureScreenshot();
UploadScreenshotForEvent(id, screenshotPath);
}

Fix in Cursor Fix in Web


@tustanivsky
Copy link
Collaborator Author

Bug: Screenshot Capture Ignores Sentry Status

The CaptureEnsure method captures and uploads screenshots based only on isScreenshotAttachmentEnabled. It doesn't verify if Sentry is enabled, meaning screenshots are still processed even after Sentry is disabled at runtime. This differs from the system error handler's logic in InitWithSettings.

Corresponding check and subscribing/unsubscribing to FCoreDelegates::OnHandleSystemEnsure are handled in USentrySubsystem.

@tustanivsky tustanivsky merged commit 4cb1b18 into main Oct 3, 2025
29 checks passed
@tustanivsky tustanivsky deleted the fix/unsubscribe-error-delegate-mac branch October 3, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants