fix(windows): dispatch repeated first-chance exceptions #2310

Closed
JulioCacko wants to merge 1 commit from upstream-pr/2310 into main
JulioCacko commented 2026-10-09 15:17:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JulioCacko on 2026-10-09T15:17:24Z.


What

The Windows vectored crash reporter sleeps forever after its first fatal-class exception, preventing subsequent first-chance exceptions from reaching later handlers. Return EXCEPTION_CONTINUE_SEARCH for subsequent reports and label the initial report first-chance. A child-process regression deliberately faults twice and verifies both faults reach a recovery handler, the child exits, and exactly one report is emitted.

This emerged during the original Demon's Souls PPSA01341 startup investigation. A diagnostic run observed mov rcx,[r12+0x10] at guest RVA 0x84bb40, with r12=0x1040 and read address 0x1050. Observed r15=0 and rdx=2 explain the immediate base through r15 + 0x820 * rdx, but the same activation's queue producer/stack-spill writer was not captured. That run exceeded its warm-run bound and establishes no acceptance result. The next debugger run was prepared and validated offline, not launched. This PR fixes exception reporting/dispatch; it does not establish a fiber lifecycle root cause or repair the invalid guest operand. Displayed title frames, menus, gameplay, and Gold status remain unverified.

Tested

Windows 11 x64, MinGW GCC, RelWithDebInfo. Focused build passed; windows_exceptions and fiber passed 2/2 (0.37 s and 0.08 s). The branch/title/body conventions check passed. Tested with the integrated contribution set on upstream d70b8998; this branch contains only the exception change. No proprietary title binaries, dumps, caches, or saves are published.

Checklist

  • Based on current main; open-PR overlap checked before submission
  • One topic per PR
  • No new code comments or investigation files in the repository
  • Generic behavior; no silent stubs or replacement guest modules
  • Depends on: none
  • AI-assisted: yes; reviewed and submitted by the author
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4802361796 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2310). Originally posted by [JulioCacko](https://github.com/JulioCacko) on 2026-10-09T15:17:24Z. --- ### What The Windows vectored crash reporter sleeps forever after its first fatal-class exception, preventing subsequent first-chance exceptions from reaching later handlers. Return `EXCEPTION_CONTINUE_SEARCH` for subsequent reports and label the initial report first-chance. A child-process regression deliberately faults twice and verifies both faults reach a recovery handler, the child exits, and exactly one report is emitted. This emerged during the original Demon's Souls PPSA01341 startup investigation. A diagnostic run observed `mov rcx,[r12+0x10]` at guest RVA `0x84bb40`, with `r12=0x1040` and read address `0x1050`. Observed `r15=0` and `rdx=2` explain the immediate base through `r15 + 0x820 * rdx`, but the same activation's queue producer/stack-spill writer was not captured. That run exceeded its warm-run bound and establishes no acceptance result. The next debugger run was prepared and validated offline, not launched. This PR fixes exception reporting/dispatch; it does not establish a fiber lifecycle root cause or repair the invalid guest operand. Displayed title frames, menus, gameplay, and Gold status remain unverified. ### Tested Windows 11 x64, MinGW GCC, RelWithDebInfo. Focused build passed; `windows_exceptions` and `fiber` passed 2/2 (0.37 s and 0.08 s). The branch/title/body conventions check passed. Tested with the integrated contribution set on upstream `d70b8998`; this branch contains only the exception change. No proprietary title binaries, dumps, caches, or saves are published. ### Checklist - [x] Based on current `main`; open-PR overlap checked before submission - [x] One topic per PR - [x] No new code comments or investigation files in the repository - [x] Generic behavior; no silent stubs or replacement guest modules - [x] Depends on: none - [x] AI-assisted: yes; reviewed and submitted by the author
oneandonlydean commented 2026-10-09 20:11:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:11:48Z.


Closing: the sleep keeps a second crashing thread from ending the process while the first report is being written, and no title is shown to need a later fault recovered after a report. Reopen with the title ID and the log where it hangs on main if you find one.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088468778 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2310#issuecomment-6088468778). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T20:11:48Z. --- Closing: the sleep keeps a second crashing thread from ending the process while the first report is being written, and no title is shown to need a later fault recovered after a report. Reopen with the title ID and the log where it hangs on main if you find one.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2310
No description provided.