Changed some "!" log entries into "_" to reflect their informative as opposed to exclamatory nature.

Inlined more helper functions.

Refined more helper functions.

Added capability to force loading of a specific shader package; if Data\Shaders\shaderpackage%03i.sdp exists, it will override others.

Added CrashSave generation; under certain conditions, a save will occur when NVAC can't prevent a crash.

CrashSaves have a "CRASH" label in the Load game menu (without NVAC they will have a "SYS" label).

CrashSaves should only be used as a last resort (in some circumstances they can contain bad data, like invalid player FaceGen data) but are available as an option (like if you hadn't saved in 4 hours and want to try to continue regardless).

Version 7.2.1.0

Fixed a logic flaw in bad pointer call recovery.

More changes to game error message logging; these will likely change further.

Version 7.2.0.0

Added heuristic detection support for one more instruction.

Improved bad pointer call recovery and related log entries.

Improved stack overflow recovery (slightly).

Added out of memory test for exceptions related to address 00AA9A41.

Added logging output for SEH hook failures.

Refined one helper function.

Inlined three more helper functions.

Version 7.1.0.0

Added heuristic detection support for MOVSS.

Added support for hang related to address 005E572B.

Added support for hang related to address 005E58BD.

Changed out of memory test sensitivity from 8 MB to 16 MB.

More changes to game error message logging; these will likely change further.

After running New Vegas, you can double check that NVAC loaded by reading the nvac.log file found in your New Vegas folder; if nvac.log doesn't exist, consult nvse.log. NVAC does not fully support the German "no gore" variant of New Vegas; I simply don't have access to it to develop for it.

Feel free to submit exceptions marked with a "u" or "v" in nvac.log in the comments. They will usually be the final entry in the log (since an unhandled exception will crash New Vegas). Please also submit "e" or "s" entries in the comments for addresses listed as "preliminary" (in the readme) as that means I haven't personally verified them; New Vegas shouldn't crash when these are logged, so it'd require checking the log file arbitrarily after a play session. The log file is cleared each time New Vegas is started.

As a bonus, NVAC implements helper function inlining (it takes internal New Vegas functions that can fit within a 5-byte space and replaces the function call with the 5-byte-or-less instruction) which is a minor performance improvement.

NVAC can be removed at any time. NVAC isn't a normal New Vegas mod (esp / esm file); it's an NVSE plugin that modifies the game's executable code at runtime, but doesn't make any permanent changes. Nothing it does gets written out to a save the way changes made by esp / esm mods do.

Deciphering the nvac.log file:

19195402 _ 00310000 03060000 nvac.dll"19195402" is a timestamp which can be read as dd:hh:mm:ss (day, hour, minute, second); in this example, (November) 19th, 7:54 pm and 2 seconds. "_" is a single letter code that identifies the log entry type, which I'll elaborate on momentarily."00310000" is a memory address; for most entries this is the address of an exception (crash)."03060000" is an informative value; in this example, the version number of nvac.dll"nvac.dll" is the module loaded at the logged address.

I'd highly recommend disabling NVAC (via your mod manager or by removing nvac.dll from your Data/NVSE/Plugins folder) while developing mods to make sure NVAC doesn't suppress any crashes that your mod causes and that could be solved on your end.

Changelog:

7.5.1.0- Fixed compatibility for automated install alongside TTW when using Mod Organizer. Thank you DarianStephens.- No change to nvac.dll (compared to 7.5.0.0).

7.4.0.0- Internal code cleanup and minor refactoring.- Added naive thread safety for log output to avoid rare mangled log output.- Added heuristic detection support for TEST instructions.- Added heuristic detection support for more x87 FPU instructions.- Added heuristic detection support for MOVSW & LODSW instructions.- Added support for a Havok physics crash related to address 00C670CE.- Added support for an NVSR variant of InterlockedCompareExchange.- Improved logging in case of a specific exception in ntdll.dll.- In-game console command to toggle log output to console (type "nvac" in the console).- Memory purge via PCB added to exception recovery attempt for address 00AA55A6.- Added exception handling during plugin load.- Changed some "!" log entries into "_" to reflect their informative as opposed to exclamatory nature.- Inlined more helper functions.- Refined more helper functions.- Added capability to force loading of a specific shader package; if Data\Shaders\shaderpackage%03i.sdp exists, it will override others.- Added CrashSave generation; under certain conditions, a save will occur when NVAC can't prevent a crash.- CrashSaves have a "CRASH" label in the Load game menu (without NVAC they will have a "SYS" label).- CrashSaves should only be used as a last resort (in some circumstances they can contain bad data, like invalid player FaceGen data) but are available as an option (like if you hadn't saved in 4 hours and want to try to continue regardless).

7.2.1.0- Fixed a logic flaw in bad pointer call recovery.- More changes to game error message logging; these will likely change further.

7.1.0.0- Added heuristic detection support for MOVSS.- Added support for hang related to address 005E572B.- Added support for hang related to address 005E58BD.- Changed out of memory test sensitivity from 8 MB to 16 MB.- More changes to game error message logging; these will likely change further.- Minor code optimizations.

6.5.0.0- Thank you beta testers.- Improved grass render range by 1 cell distance; affected by fGrassStartFadeDistance.- Removed Sleep from last chance DirectX reset recovery; it wasn't helping.- Removed support for address 008256D9; it was slow and is now handled automatically.- Fixed a purely theoretical bug in IAT patching code.- Added support for hang related to address 00C3E159.- Added log output for a hang related to address 00A5BA62.- Added log output for program self-termination.- Added support for EXCEPTION_ILLEGAL_INSTRUCTION and EXCEPTION_PRIV_INSTRUCTION.- Added heuristic detection support for 49 more instructions.- Inlined six more helper functions.- Refined (optimized) three helper functions.- Refined a specific floating point zero test (39 locations).

6.4.0.0- Added an out of memory check to exceptions related to address 00ED2C9E.- Added a minimum Sleep to last chance DirectX reset recovery.- Improved recovery from null pointer call, null instruction and middle of nowhere exceptions.- Fixed heuristic detection support for x87 instructions that begin with D8.- Inlined one more helper function.

6.2.0.0- Preliminary support for address 00B63EFF.- Improved support for address 00E8C00B.- Added heuristic detection support for 920 more instructions.- Removed support for an asset loading hang added in version 5.8.0.0.- Added log output for two potential hangs.- Inlined two more helper functions.

6.1.0.0- Added heuristic detection support for hundreds more instructions.- Improved handling of MOVAPS.- Made changes to various hang fixes.- Added an out of memory check to exceptions related to address 00AA55A6.- Removed targeted support for NVSE 3b2 (there's a newer version now).- Inlined 20 more helper functions.

6.0.0.0- Added heuristic detection support for hundreds more instructions. Thank you beta testers.- Preliminary support for another asset loading hang.- Overhauled the instruction parser in the "global" exception handler.- Improved identification of the host process (usually FalloutNV.exe).- Logs will no longer get crazy huge in the case of an infinite loop.

5.9.0.0- Added experimental heuristic detection support for ten more instructions.- Inlined two more helper functions.

5.8.0.0- Preliminary support for an asset loading hang.- Inlined two more helper functions.- Minor code optimizations.

5.7.0.0- Preliminary support for address 005E0F16.- Preliminary support for address 006BF48E.- Preliminary support for address 00E8C00D.- Added heuristic detection support for ten more instructions.- Inlined two more helper functions.

5.4.0.0- Added a utility to the Optional Files area to benchmark the speed of NVAC's exception handler.- Narrowed support for a specific New Vegas hang.- Added heuristic detection support for 18 more instructions.- Moved inliner address list to end of code section.- Improved logging output.

5.3.0.0- Preliminary support for address 005A8EE0.- Broadened support for a specific New Vegas hang.- Added heuristic detection support for 23 more instructions.- Converted some heuristic detection comparisons into a jump table.- Inlined one more helper function.- Removed import jump table.

5.2.0.0- Added support for GECK address 00936733.- Fixed a specific New Vegas hang; the ntdll.dll one. Thank you commoner31.- Added heuristic detection support for three more instructions.- Inlined four more helper functions.- Improved logging output.

5.1.0.0- Preliminary support for address 00804432.- Preliminary status removed for address 00A61693.- Added heuristic detection support for two more instructions.- Added support for GECK version 1.4.0.518 and fixed a Head Preview crash.

5.0.0.0- Preliminary support for address 006F47FC.- Logging now records an averted hang / freeze with an "f" entry.- Changed the fast exit for a specific ntdll.dll exception.- Improved logging output for a specific ntdll.dll exception.- Added heuristic detection support for three more instructions.- Inlined four more helper functions.- Improved speed of code patching.

4.9.0.0- Changed exception recovery for address 0051E2EA.- Preliminary support for address 0064DAD6.- Fixed a specific New Vegas hang (hopefully); not the ntdll.dll one.- Made the fast exit more aggressive for a specific ntdll.dll exception.- Improved logging output for a specific ntdll.dll exception.- Some minor efficiency improvements and code reorganization.

4.8.0.0- Preliminary support for address 00A61693.- Changed a hang into a fast exit for a specific ntdll.dll exception.- Logging now includes an entry for NVSR's fast exit.- Fixed erroneous logging output related to address 00401992.- Improved logging output related to address 00AA55A6.

4.7.0.0- Preliminary support for address 006B43FC.- Preliminary support for address 006B96CC.- Logging now includes an entry for a Missing Master (0046158A) crash.

4.6.0.0- Preliminary support for address 005595B1.- Preliminary support for address 00AAA60A.- Added heuristic detection support for five more instructions.- Inlined three more helper functions.

4.5.1.0- Fixed a mistake in 4.5.0.0 that prevented New Vegas from starting.

4.5.0.0- Preliminary support for address 00EC61FD.- Preliminary support for address 00EC6225.- Added heuristic detection support for six more instructions.- Logging now includes an entry for a successful exit (but not for NVSR's fast exit).- Inlined two more helper functions.

4.3.0.0- Changed the main SEH hook slightly.- Added heuristic detection support for four more instructions.- Added support for exceptions within NVAC's exception handler.- Added recovery attempt for "middle of nowhere" exceptions.

4.2.0.0- Preliminary support for address 006BF460.- Added heuristic detection support for ten more instructions.- Inlined three more helper functions.- Moved inliner address list to code section.

4.1.0.0- Added heuristic detection support for ten more instructions.

4.0.0.0- Implemented additional SEH hooks; this should catch more errant unhandled exceptions.- Added heuristic detection support for one more instruction.- Minor efficiency improvements in various internal NVAC functions.- Logging now lists the location of the original crash address prevented in "n" entries.- Inlined two more helper functions.

3.6.0.0- Changed exception recovery for address 00AA55A6, again.- Added support for address 0045840A.- Preliminary support for address 0094E607.- Preliminary support for address 00A2FC8D.- Preliminary support for address 00A5E378.- Preliminary support for address 00D1F29C.- Inlined two more helper functions.

3.5.0.0- Changed exception recovery for address 00AA55A6, again.- Restored support for address 0043C47A.- Preliminary support for address 00AAA62E.- Inlined three more helper functions.

3.4.0.0- Restored preliminary support for address 006ADB69.- Restored preliminary support for address 006FCF03.- Preliminary support for address 00440DAA.- Preliminary support for address 004A408A.- Preliminary support for address 00559506.- Preliminary support for address 0057E141.- Preliminary support for address 008256DC.- Preliminary support for address 008A5328.- Preliminary support for address 00AA6F14.- Preliminary status removed for NVSE offset 000443B8.- Inlined two more helper functions.- Fixed compatibility with SEHOP.

3.3.0.0- Finished integrating function inlining with the global exception handler.- Added support for address 004FD3CA.- Preliminary support for address 00401992.- Preliminary support for address 00D0D7D8.- Inlined two more helper functions.

3.0.0.0- Implemented more efficient method of handling simple exceptions.- Added support for address 0065893A.- Preliminary support for address 0054546F.- Preliminary support for address 0061387D.- Preliminary support for address 006ADB69.- Preliminary support for address 006FCF03.- Preliminary support for address 00C9E64E.

2.9.0.0- Changed exception recovery for address 00AA55A6.- Preliminary support for address 0057C876.- Preliminary support for address 006A7F22.- Preliminary support for address 006BF1DA.- Preliminary support for NVSE offset 000443B8.

2.8.0.0- Added support for address 009611EA.- Preliminary support for address 00405440.- Preliminary support for address 006B9102.- Preliminary support for address 00A02F52.- Preliminary support for address 00A09FCA.- Preliminary support for address 00EC621F.- Preliminary status removed for NVSE offset 00020A07.- Improved mod manager support. Thank you freddy_farnsworth.

2.4.0.0- Preliminary support for address 0084E3AA.- Added support for installation via mod manager (hopefully).- Logging now lists the location of the original crash address prevented in "e" and "s" entries.- Logging now lists the module filename for the address of the exception.

2.3.0.0- Preliminary support for address 00A61A74.- Improved logging output (was writing some NULLs where I meant to put spaces).

2.2.0.0- Logging now has a meaningful timestamp (ddhhmmss, day:hour:minute:second).- Unhandled exceptions are now logged. Submit them in the comments.