Skip to content

Crash report via Sentry - #3348

Draft
xen2 wants to merge 12 commits into
stride3d:masterfrom
xen2:feature/crash-report-sentry
Draft

Crash report via Sentry#3348
xen2 wants to merge 12 commits into
stride3d:masterfrom
xen2:feature/crash-report-sentry

Conversation

@xen2

@xen2 xen2 commented Aug 10, 2026

Copy link
Copy Markdown
Member

PR Details

Adds an optional crash report upload to the GameStudio and Launcher crash window, sending to Sentry only when the user clicks Send report.
Nothing is sent automatically.

image

What's sent

  • Exception and callstacks (including inner exceptions)
  • App version, OS, CPU/GPU, active graphics adapter and API, memory state
  • Last 50 log lines and recent undo/redo actions as breadcrumbs
  • The full report as a report.txt attachment (same text as View report)

Privacy

  • Only on explicit click, no automatic telemetry.
  • Windows user name and profile path are masked in the report and inside the optional minidump (module paths, PDB paths, stack memory).
  • No personal identity: only an anonymous random installation id (to count affected machines), disclosed in the window. IP storage is off server-side.
  • Optional name/email/description, sent only if the user fills them in.

Extras

  • Opt-in minidump (thread stacks + modules), or save a minidump / full memory dump locally to share yourself.
  • Official builds set the DSN via StrideSentryDsn (build property, false disables the button); source builds let the user pick a destination.

Config

  • StrideSentryDsn / StrideSentryEnvironment build properties.
  • Not wired into the runtime engine; editor tools only.

Related Issue

#3279 #2261 #3 #1815 #204

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

xen2 added 11 commits August 11, 2026 00:23
Official builds bake a DSN via StrideSentryDsn (false disables sending,
unset lets the user pick a destination per crash). Reports carry
app@version release, environment tag, and are anonymized including
Sentry stack frames. Nothing is sent without a click.
The full Win32_VideoController dump included machine-identifying
values such as SystemName and PNPDeviceID.
Tags for Stride version, graphics API, and active GPU; typed GPU context
matched from the WMI inventory; per-adapter and memory context panels;
log lines and undo/redo actions as breadcrumbs; the rest as extras.
report.txt stays attached as the exact text the user previewed.
Optional minidump (thread stacks + modules) behind an unchecked-by-default
checkbox with a privacy warning.
Report the adapter the editor renders with (WMI order does not identify
it), the graphics platform, the CPU model, working set + GC memory
info, and grow the log ring buffer to 50 lines including warnings.
Sent through Sentry user feedback attached to the crash event; all three
fields are empty by default and only sent when filled in.
Readable colors when the host theme dictionaries are absent (crash
before the application initialized), fields above the button row,
auto-sized buttons, clearer minidump wording.
Walks the stream directory and masks only inside module name strings,
CodeView records (PDB paths), and captured memory ranges, with
same-length overwrites so offsets never shift. ASCII names match
case-insensitively; non-ASCII names as exact byte patterns of their
common casings in UTF-16, UTF-8, and Latin-1. Validated: scrubbed dump
opens in cdb with all thread stacks and symbols intact, and byte scans
find no remaining occurrence in any encoding.
Save dump dropdown with two choices: the small anonymized minidump, or
a full memory dump written straight to disk after a warning that it
includes project data. The full dump never leaves the machine; sharing
it is the user's own choice, which also sidesteps upload size limits.
Official builds state that the report goes to the Stride team through
Sentry (source builds name their destination in the chooser). Send
report is the default button (Enter in the DSN box routes to Send now
instead). Escape closes like the X, both guarded by a confirmation if
a typed description would be lost. Line break in the intro, and the
extinguisher icon was near-black on the dark background.
The dev DSN routes through crash.stride3d.net (Azure Front Door proxy to
Sentry) so the backend can move without rebuilding shipped binaries.
Events keep the SDK's random installation id so issues can count affected
machines; SendDefaultPii=false drops name/email/IP (IP storage is also
disabled server-side). A contact email travels only through the feedback
field. The window notice discloses the identifier.

public static Dictionary<string, string> GetVideoConfig()
{
return OperatingSystem.IsWindows() ? GetVideoConfigWindows() : [];

@Jklawreszuk Jklawreszuk Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You're calling OS-specific code. I know GameStudio isn't cross-platform yet, but it's worth having these checks somewhere in place for the future. But its just a nitpick 😅️

@Jklawreszuk Jklawreszuk Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm, now that I think about it, we could move AppHelper to a new folder called "Desktop" (or Core?). The same thing goes with FileLock.cs (its fully xplat now)

@VaclavElias

Copy link
Copy Markdown
Contributor

Did we use this? https://sentry.io/for/open-source/

@Kryptos-FR

Kryptos-FR commented Aug 10, 2026

Copy link
Copy Markdown
Member

I just fixed the conflicts with the new Launcher 😅. Can we decide if we merge that first or not?

And make sure the crash helper classes and methods are cross-platform as much as possible.

Sentry derives a city-level location from the forwarded client IP, and
neither disabling IP storage nor a $user.geo scrubbing rule removes it
(geo is enriched after scrubbing). Sending a concrete 0.0.0.0 instead of
no IP stops the fallback to the forwarded address, so no location is
derived.
@xen2

xen2 commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

I just fixed the conflicts with the new Launcher 😅. Can we decide if we merge that first or not?

And make sure the crash helper classes and methods are cross-platform as much as possible.

Good point, let's get it done, then I can rebase this PR on it.
However, it is currently not mergeable (This branch cannot be rebased due to conflicts).
If you can quickly fix the last conflicts, I can merge it today, thanks!

@Ethereal77

Copy link
Copy Markdown
Contributor

It's not very important, as it's just a crash handler window, but...

  • I'd massage the spacing between elements a bit. They look pretty crammed.
    There's some windows in GameStudio (not just specifically this one) that seems like they were designed in times where 800x600 was the maximum safe size of a window, but in today's monitors these windows look a bit too small sometimes.

  • I'd add the info of "What's sent" to the window, for maximum clarity on what you (the user) are about to send. Nothing too verbose. What you have written in the PR description on what is sent should suffice. Also, I would relocate the bottom text about anonymization to the top, just below the info on what's sent.

@Kryptos-FR

Copy link
Copy Markdown
Member

@xen2 not sure what remaining conflict you are talking about. I had already fixed all conflicts before making my comment.

@ferafiks

Copy link
Copy Markdown
Contributor

Not really related to functionality, but I think there are too many buttons at the bottom, creating choice paralysis. It would be good to separate "Send report" and "Open an issue" to a separate row and color them differently from others if that's possible. Or alternatively, move those to the right and the others to the left.

Also, where would you be able to view these reports? I am assuming they would be public? It would be good to link that in the docs somewhere

@xen2

xen2 commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

@xen2 not sure what remaining conflict you are talking about. I had already fixed all conflicts before making my comment.

Somehow github doesn't show the merge button due to that.
Let me take a closer look.

@xen2

xen2 commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Not really related to functionality, but I think there are too many buttons at the bottom, creating choice paralysis. It would be good to separate "Send report" and "Open an issue" to a separate row and color them differently from others if that's possible. Or alternatively, move those to the right and the others to the left.

Also, where would you be able to view these reports? I am assuming they would be public? It would be good to link that in the docs somewhere

I already did try to make the Send report stand out by putting it in bold and default focus for enter button.
I agree it might not be enough.
Maybe I can highlight it a bit more by using a slightly different button color, or some placement trick.

@xen2

xen2 commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

@xen2 not sure what remaining conflict you are talking about. I had already fixed all conflicts before making my comment.

Sorry, it was me being tricked by github UX, and I think it's not the first time (it remembered rebase/squash as my last action so it was showing greyed out and impossible to merge with conflicts; I was confused with the button being greyed out, the dropdown is still available to go back to merge)

@xen2

xen2 commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Also, where would you be able to view these reports? I am assuming they would be public? It would be good to link that in the docs somewhere

The full dashboard won't be public as it might expose private info (stack dump if user selects them, email/desc if user fills it, etc.)
However, what can be done:

  • since I have OSS account, we have unlimited user so happy to create an account for any serious/core contributor
  • from sentry dashboard, it's easy (one-click?) to create a github issue with non-private info
  • we could easily generate a public dashboard of top crashes (or even all crashes), with limited public info (i.e. only title, first/last seen dates, count, affected versions, link to github issue if it exists, etc.)

@xen2
xen2 marked this pull request as draft August 11, 2026 09:10
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Draft PR — automatic CI is skipped to save runner minutes.

  • Mark the PR ready for review to run the full automatic CI — or add a ci-run-on-draft label to run it now without leaving draft.
  • Or arm a specific opt-in suite: ci-enduser, ci-editor, ci-ios, ci-android.

@xen2

xen2 commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Switching to draft as I adjust a few loose ends and rebase (I need to decide if convert to Avalonia or keep WPF version until full editor is Avalonia).

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.

6 participants