Skip to content

Add out-of-process screenshot capturing on Windows#1325

Merged
tustanivsky merged 5 commits into
mainfrom
feat/native-screenshot
Apr 1, 2026
Merged

Add out-of-process screenshot capturing on Windows#1325
tustanivsky merged 5 commits into
mainfrom
feat/native-screenshot

Conversation

@tustanivsky

@tustanivsky tustanivsky commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

The current in-process Slate-based screenshot capture during crashes might now always work because the rendering pipeline may be in a broken state when the crash occurs. The native SDK's out-of-process approach captures screenshots from a separate process making it significantly more reliable. It also supports fast-fail crashes that bypass SEH (crashpad backend).

Summary

  • Adds a new EnableOutOfProcessScreenshots setting under General|Attachments that delegates crash screenshot capture to sentry-native's sentry_options_set_attach_screenshot API
  • When enabled on Windows, crash screenshots are captured out-of-process (via crashpad handler or native daemon) using GDI+ instead of in-process via Unreal's Slate renderer
  • Non-crash screenshots (ensures, hangs) continue using the existing Slate-based capture on all platforms
  • Default is off (existing Slate-based behavior is preserved unless explicitly opted in)

Documentation

@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Prevent potential script injection in crash-reporter-build workflow by fix-it-felix-sentry in #1324

Internal Changes 🔧

  • (deps) Update CLI to v3.3.5 by github-actions in #1323
  • Update validate-pr workflow by stephanie-anderson in #1328

Other

  • Add out-of-process screenshot capturing on Windows by tustanivsky in #1325
  • Add out-of-process screenshot capturing on Windows by tustanivsky in #1325

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- Add out-of-process screenshot capturing on Windows ([#1325](https://github.com/getsentry/sentry-unreal/pull/1325))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 479a27e

@tustanivsky tustanivsky marked this pull request as ready for review April 1, 2026 06:09
Comment on lines +470 to +474
UPROPERTY(Config, EditAnywhere, Category = "General|Native",
Meta = (DisplayName = "Out-of-process screenshot capturing (Experimental)", ToolTip = "Flag indicating whether crash screenshots should be captured out-of-process by the native SDK using OS-level APIs instead of Unreal's Slate renderer. More reliable during crashes since it doesn't depend on the rendering pipeline being functional. Currently supported on Windows only. Requires `Attach screenshots` to be enabled.",
EditCondition = "AttachScreenshot"))
bool UseNativeScreenshotCapturing;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should either bundle "screenshot capture" into one option/flag, or if this is split into two because it is experimental, have experimental in the name. Either that or there should be a hierarchy to them. The user opts into screenshot capture, and then also opts into capturing them out-of-process.

Documenting and explaining this here and on other platforms is going to be really hard because when is what captured by who? In which error case is what option going to kick in?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Either that or there should be a hierarchy to them. The user opts into screenshot capture, and then also opts into capturing them out-of-process

That make sense - I'll put this new setting next to AttachScreenshot so it will be easier for users to configure all screenshot-related matters in one place. We can also benefit from covering this in more details docs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Follow-up docs PR: #1325

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also, grouped two settings together:
image

@bitsandfoxes bitsandfoxes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What are the limits to this? Is this going to capture the actual screen? Just the game window? Overlays?

@tustanivsky

Copy link
Copy Markdown
Collaborator Author

What are the limits to this? Is this going to capture the actual screen? Just the game window? Overlays?

Native capture only records the game/editor window and crops out any overlays:

image

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.

4 participants