# GTA V Legacy Crash Analyzer

A native 64-bit Windows diagnostic tool for GTA V Legacy. It provides a single-screen dashboard, background Crash Guard, ASI startup-failure detection, launcher diagnostics, OpenIV checks, memory and disk checks, readable probable-cause explanations, and a native setup program.

## Install

1. Extract the public release ZIP.
2. Close GTA V and Rockstar Games Launcher.
3. Run `GTA5LegacyCrashAnalyzer-Setup.exe`.
4. Select the folder that contains `GTA5.exe` if it is not detected automatically.
5. The setup program backs up existing analyzer files, installs the EXE, ASI, and INI beside `GTA5.exe`, and preserves an existing analyzer configuration.

The optional `GTA5LegacyCrashAnalyzer.oiv` installs the same three runtime files through OpenIV. Install it into the main GTA V folder, not the `mods` folder.

## Crash Guard

Start the analyzer and leave it running in the system tray. Crash Guard uses read only process monitoring and low frequency polling. A normal GTA V exit is not reported as a crash. A crash report is created only for recognized crash-style exit codes, and the analyzer can reopen itself after an actual crash.

Closing the analyzer with the X button fully exits the process. To keep Crash Guard active, close the window only after confirming the analyzer remains in the tray, or use the normal minimize behavior.

## Diagnosis features

- Reads `asiloader.log` and identifies an ASI that starts loading without a matching loaded entry.
- Queries Windows Application Event ID 1000 for GTA5.exe faulting module and exception evidence.
- Uses recent log evidence before falling back to `ERR_GFX_D3D_INIT`, avoiding stale-log false positives.
- Checks `mods\update\update.rpf` without falsely claiming that embedded `dlclist.xml` or `gameconfig.xml` are missing loose files.
- Reports clean plugin filenames and OpenIV archive paths.
- Checks memory pressure and game-drive free space.
- Checks Rockstar Games Launcher logs for common authentication and service errors.
- Checks VPN or tunnel adapter names, Windows proxy settings, `dinput8.dll`, and BattlEye evidence.
- Offers a reversible Social Club cache rename to `Social Club_backup` instead of deleting user data.
- Displays an animated, buffered scan indicator while background diagnostics run.

## Safety

The analyzer is a normal user-mode Windows application. It does not access BIOS or UEFI, install drivers, inject into GTA V, modify RPF archives, terminate GTA V, or change firewall and security settings. Diagnostic scans are read only. The Social Club cache option is the only repair action, and it renames the folder so it can be restored.

Use the tool on a GTA V Legacy installation that you own. Back up mod files before changing them. The analyzer is not code-signed by a verified publisher unless a real certificate is later applied by the distributor, so Windows may display an unknown-publisher warning.

## Release contents

- `GTA5LegacyCrashAnalyzer-Setup.exe`: native setup program.
- `GTA5LegacyCrashAnalyzer.exe`: analyzer and Crash Guard.
- `GTA5LegacyCrashAnalyzer.asi`: loader-safe ASI component.
- `GTA5LegacyCrashAnalyzer.ini`: user configuration.
- `GTA5LegacyCrashAnalyzer.oiv`: OpenIV installer.
- `README.md`: installation and safety notes.

This release is compiled from the included native C++ sources. A live GTA V crash test, Windows Event Viewer test, OpenIV test, and launcher test must be performed on a real Windows PC because those environments are not available in the build sandbox.
