Repository navigation
Conversation
17 tasks
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Testing was limited to a desktop Mono simulation, leaving real GameCore builds and Xbox devkit validation of native-library loading/fallback, crash upload/symbolication, and process termination outstanding.
No open issues 🎉
What changed in this PR
Adds the public-package support for native Xbox crash reporting by reusing the Windows bindings with the separately distributed BugSplat Xbox add-on. Real GameCore builds and devkit validation remain pending.
Changes:
- Enables native bindings for
UNITY_GAMECORE, with managed-only fallback when the native library is missing. - Adds a default-enabled Xbox option while keeping desktop-specific controls off Xbox.
- Documents console support and tests the new option’s default.
| File | Description |
|---|---|
| Tests/Runtime/BugSplatInitializationTests.cs | Tests that native Xbox reporting defaults to enabled. |
| Runtime/Client/BugSplatOptions.cs | Adds the Xbox native reporting option and add-on guidance. |
| Runtime/BugSplat.cs | Extends Windows bindings to Xbox and handles a missing native library. |
| README.md | Explains console support and gated add-on access. |
| CHANGELOG.md | Records Xbox support, fallback behavior, and desktop-only options. |
Review effort: Balanced
The GDKX build of bugsplat-windows has the same BugSplat_* C API as the desktop build, so the Windows bindings now compile for UNITY_GAMECORE too. The GDKX binaries are gated to verified Xbox developers and ship in a separate add-on; this package references nothing from it. When the add-on is missing, BugSplat_Init throws DllNotFoundException, which is caught once at startup: the player logs where to get the add-on and keeps reporting managed exceptions. Every later native call already checks nativeCrashReportingEnabled. On Xbox the crash dialog is forced off, and the Windows Error Reporting status, the WindowsShowCrashDialog setter and hang detection stay desktop-only. UseNativeCrashReportingForXbox (default true) turns it off. No GameCore module here, so the Xbox branches were compiled by adding #define UNITY_GAMECORE to a scratch copy of BugSplat.cs and building a Windows player. That player started native reporting on the desktop BugSplat.dll and skipped the WER check, and with BugSplat.dll removed it logged the add-on warning and still initialized managed reporting. Refs #261 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
…oard uGUI only navigates from a selected control, and the menu's buttons are built in code, so nothing was selected and a controller on Xbox had no way to move through the list. The menu now selects the first runnable row, keeps a row selected when focus is lost, outlines the focused button, and scrolls it into view. Non-runnable rows are skipped because they're not interactable. The feedback dialog takes focus on Cancel when it opens, closes on Cancel (B, or Escape), and dims buttons until focused. The menu is made non-interactable while it's open, because navigation is spatial and the stick would otherwise move focus onto the rows behind the dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
The sample treated Xbox as an unknown platform: its status line said native crash reporting was unsupported and it offered no native scenarios. Xbox now gets a NATIVE group - null write, the same on a background thread, Unity's ForceCrash access violation, and a stack overflow - and the status line and hint name Xbox and the BugSplat for Xbox package. The faults avoid the kernel32 P/Invokes the Windows scenarios use, which a Game Core title may not be able to load by name. Consoles are IL2CPP only, so a null write through Marshal is a real native fault there. Fail-fast and hang scenarios are left out: there is no WER on Xbox, and hang detection is desktop only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
ForceCrash goes through Unity's own crash path rather than the process's exception handler, so BugSplat doesn't capture it - the reason no other platform's scenarios use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
The Xbox add-on needs to upload the PDBs and binaries an Xbox build produces, which the package's own build step knows nothing about. BugSplatSymbolUpload.Upload(directory, globPattern, options) exposes the existing upload - the pinned, SHA-256-verified symbol-upload, the per-database credentials, and the options' database, application and version - instead of the add-on carrying its own copy. UploadDebugSymbolsForXbox defaults to true, as Windows does: Xbox crashes don't symbolicate without the upload, and Unity's public symbol server doesn't have the Xbox player's symbols. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
The access-violation scenarios walk AccessViolationWrite through NativeCrashFrame0..2 so a report shows a game-code call stack, but each was an expression-bodied call in tail position. MSVC compiled those calls to jumps, so on Xbox (IL2CPP) the frames never existed and the report went straight from UnityAction.Invoke to Marshal.WriteInt32. NoInlining stops inlining, not tail calls. Each frame, and the Crash helper that runs the scenario, now writes the volatile Sink after its call, which keeps the call out of tail position on Windows and Xbox alike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC
daveplunkett
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The public-package half of the Xbox work in #261. The GDKX build of bugsplat-windows has the same
BugSplat_*C API as the desktop build, so the existing Windows bindings now also compile forUNITY_GAMECORE. The GDKX binaries are only for verified Xbox developers and ship in a separate add-on. This package doesn't reference anything from it.BugSplat_InitthrowsDllNotFoundException, which is caught once at startup. The player logs where to get the add-on and keeps reporting managed exceptions. Every later native call already checksnativeCrashReportingEnabled.SetWindowsCrashDialogEnabledandSetWindowsHangDetectionTimeoutstayUNITY_STANDALONE_WINonly.BugSplatOptions.UseNativeCrashReportingForXboxdefaults totrue, matching the other platforms.Verification
This machine has no GameCore module, so the Xbox branches were exercised by adding
#define UNITY_GAMECOREto a scratch copy ofBugSplat.csand building a Windows player (Unity 6000.5, Mono):BugSplat.dllpresentBugSplat.dllremoved (no add-on)native=False, managed reporting still initializedEditMode tests pass 18/18 and PlayMode tests pass 158/158, including a new default test for
UseNativeCrashReportingForXbox.Still to do on a devkit (#261)
15(Unity native) so the backend applies the IL2CPP line mappings; confirm that's right for Xbox dumps.🤖 Generated with Claude Code
https://claude.ai/code/session_0153YxLptnAqnBKq5T1hyrtC