Getting Crash: Write to location 000000a6 caused an access violation.
The game crashes while playing a level with wave spawning enemies. Strangely before the crash happens certain assets aren't being rendered in game view (but in scene view they do), objects in general start disappearing, physics start glitching out, and then eventually the game just crashes.
I was thinking the crash would be caused by somehow overloading the Garbage Collector since a lot of prefabs are instantiated over a short amount of time and the enemy corpses are not cleaned up straight away. It also doesn't seem like a RAM issue. Here is the error.log file:
Project1 [version: Unity 2017.1.1f1 (5d30cf096e79)]
MyBuild.exe caused an Access Violation (0xc0000005) in module MyBuild.exe at 0023:01910cb6.
Error occurred at 2017-09-20_163918. D:\Games\Test_Build\MyBuild.exe, run by luxz1. 34% memory in use. 0 MB physical memory [0 MB free]. 0 MB paging file [0 MB free]. 0 MB user address space [2859 MB free]. Write to location 000000a6 caused an access violation.
Context: EDI: 0x00000082 ESI: 0x00000002 EAX: 0x03f27f78 EBX: 0x33edb6e0 ECX: 0x03f27f70 EDX: 0x18002040 EIP: 0x01910cb6 EBP: 0x00b3f93c SegCs: 0x00000023 EFlags: 0x00210217 ESP: 0x00b3f930 SegSs: 0x0000002b
Bytes at CS:EIP: 89 77 24 8b 72 24 ff 08 8b 09 8b 00 8b 04 81 8d