Skip to content

Conversation

@tustanivsky
Copy link
Collaborator

This is a follow-up PR for #1170 that enables printing crash stack traces to the game log for all Microsoft platforms (Windows, Xbox).

The Windows-specific crash logger implementation which performs stack walking on a separate thread to avoid issues with memory allocations during certain crash types (e.g. stack overflows or memory corruption) has been moved to the Microsoft subdirectory. The internal APIs it relies on are also supported on Xbox so there is no need to duplicate this largely generic code for XSX and XB1 targets.

Unlike on Windows, the Xbox platform-specific implementation of FPlatformStackWalk::StackWalkAndDump ignores the crash context input parameter and always performs stack walking for the current calling thread (which in this case is the logger thread). This results in an irrelevant call stack being captured. To work around this, PlatformStackWalk::CaptureThreadStackBackTrace is used instead and the captured frames are then manually converted into human-readable strings before flushing the logs.

Related issues:

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against f04f5ef

@tustanivsky tustanivsky requested a review from mujacica December 22, 2025 07:01
@tustanivsky tustanivsky merged commit f5cd759 into main Dec 22, 2025
209 of 211 checks passed
@tustanivsky tustanivsky deleted the feat/crash-logs-microsoft branch December 22, 2025 10:52
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