Files
source/sgp
56e6873b80 write a crash report when an assertion fails
Assertions ship in every configuration - Ja2/builddefines.h defines
FORCE_ASSERTS_ON unconditionally - so a player on a release build hits the
runtime error screen with a line and a file, and that is all anyone ever
gets. The crash handler that would have written a report never runs,
because an assertion faults nothing.

Raise a software exception from _FailMessage so it does. The code has the
customer bit set, the handler recognizes it, and the report carries the
assertion's line, file and message alongside the usual registers, module
table and frame chain, which symbolizes back to the assertion site. The
exception is swallowed again immediately: first-chance is all the handler
needs, and letting it travel further would kill a game that means to show
its error screen.

The dumper needed two adjustments to cope with an exception nobody faulted:
its one-report-per-address rule keys on the assertion's own file and line,
since every raise shares RaiseException's address, and the re-entry latch
is lifted in the __except, which is the only code that runs if writing a
report faults.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 16:51:06 -03:00
..
2025-02-24 21:42:36 +02:00
2025-02-24 21:42:36 +02:00
2025-09-24 16:14:10 +03:00
2025-02-24 21:42:36 +02:00