Skip to content

Prevent silent crashes and improve crash dialog reliability - #5441

Open
MohabCodeX wants to merge 4 commits into
multitheftauto:masterfrom
MohabCodeX:fix/prevent-silent-crashes
Open

MohabCodeX wants to merge 4 commits into
multitheftauto:masterfrom
MohabCodeX:fix/prevent-silent-crashes

Conversation

@MohabCodeX

Copy link
Copy Markdown
Contributor

This PR aims to prevent silent crashes where MTA:SA unexpectedly closes without showing the crash dialog or saving diagnostic logs. On 64-bit Windows running a 32-bit process, exceptions that occur inside window procedures and message callbacks are swallowed by default under WOW64, causing the game to exit silently before reaching our unhandled exception filter; calling SetProcessUserModeExceptionPolicy with 0 ensures these exceptions properly propagate so the crash handler can capture them. In addition, the crash dialog is now located using the spawned process ID instead of relying on a hardcoded English window title (which previously caused silent timeouts on non-English locales), memory inspections during dump generation are wrapped in SEH to prevent secondary crashes while writing dumps, and an emergency in-process message box fallback was added in case the external crash tool fails to launch.

Copilot AI lite review requested due to automatic review settings September 22, 2026 15:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Sep 23, 2026
Copilot AI lite review requested due to automatic review settings November 17, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Active moderate findings remain in crash-dialog discovery, fallback handling, and exception-policy error reporting, including duplicate dialogs and false or missed success detection.

5 open issues

Review effort: Lite

Comment thread Client/core/CCrashDumpWriter.cpp Resolved
Comment thread Client/core/CCrashDumpWriter.cpp Resolved
Comment thread Client/core/CCrashDumpWriter.cpp Resolved
Comment thread Client/core/CrashHandler.cpp Resolved
Comment thread Client/core/CCrashDumpWriter.cpp Resolved
Copilot AI lite review requested due to automatic review settings November 18, 2026 11:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants