[Crash] Crash due to Access Violation
ThunderHawk2
Join Date: 2016-12-19 Member: 225164Members
Any help appreciated!
Game periodically crashes due to access violation. The crash appears to be related to Seamoth usage at no particular location. Game crashes about once a minute, rendering the game unplayable. This is a fresh game started after the Precursor update, though I had similar crashes in games before the update.
Drivers are up to date and I have already tried to reset the texture cache by deleting the Cache folders in the save folder, which didn't help.
Relevant text of the crash log is this:
Error log here: http://pastebin.com/4EDDTrtC
Game periodically crashes due to access violation. The crash appears to be related to Seamoth usage at no particular location. Game crashes about once a minute, rendering the game unplayable. This is a fresh game started after the Precursor update, though I had similar crashes in games before the update.
Drivers are up to date and I have already tried to reset the texture cache by deleting the Cache folders in the save folder, which didn't help.
Relevant text of the crash log is this:
Unity Player [version: Unity 5.4.3f1_01f4c123905a]
Subnautica.exe caused an Access Violation (0xc0000005)
in module Subnautica.exe at 0033:00000000.
Error occurred at 2016-12-18_200208.
E:\Program Files (x86)\Steam\steamapps\common\Subnautica\Subnautica.exe, run by ThunderHawk2.
63% memory in use.
8145 MB physical memory [2987 MB free].
12241 MB paging file [4617 MB free].
134217728 MB user address space [134214081 MB free].
Write to location 00000000 caused an access violation.
Error log here: http://pastebin.com/4EDDTrtC
Comments
After taking a look at the crash reports the engine creates, I realized that it always creates an access violation in some later parts of the graphics card RAM. I combined this finding with the observation I've made that the crashs are pretty much reproducable when I look around TOO FAST in a crowded area. Add the other observation that clearing the object caches helps reducing the bugs, the graphical stuttering, and my own past experience with older versions of the Unity Engine, I'm pretty sure that following happens:
The game has an incorrect thread handle execution. The object layer tries to load the batches, but freaks out on it and repeats the process several times (matches the observation of wrecks spawned with half a dozen locked doors at the same place). The thread handler now tries to write the content into the frame buffer, but since it already is loading, the graphics driver freaks out and wants to the access the same memory address several times simoultaneously. This creates the overflow exception which shoots down the engine. It would match the observation that I was able to reduce crashes by looking around more slowly to give the handler more time to re-allocate memory address space. I THINK I also tracked one of the crash reports back to Windows' graphics driver access dll, so this would match the theory.
A solution path would now be to check the thread handler and object layer of the current version, if memory serves me you switched Unity versions some time ago, maybe the code has to be adapted to the engine core. Because I had similar problems in the past in other Unity games, which could be tracked back to a similar issue.
If there's someone with some experince in software / game design around, I'd be very interested in your observations.
Kind regards
@Wustuv - I have some game design experience and I used to work with Unity, but I used to write AI, not graphics, so I can only speculate. I find your proposed explanation plausible, but it doesn't explain why these access violation crashes seem to be associated with particular locations, ie: the mountain island or a base. On the other hand, it would explain crashes with Seamoth travel. I'm more inclined to think that particular textures are causing the crashes. I admit that the crashes appear to be related to moving/looking around fast, but I can't explain why.
(Actually, one explanation might be that the Unity object layer is loading particular textures multiple times, but not others. I have no idea what the cause of this might be, and the stack trace in the output log is meaningless to me.)
I'm a little annoyed because (looking around at the other access violation crash complaints in this subforum) this crash is clearly both common and game-breaking, so it should be on top of the Devs' list of priorities to fix.
@Obraxis is any of that ^ close to target on the crashing issue?
@Wustuv - I do think there's some kind of problem with graphics elements being loaded multiple times. It sounds like it's associated with Seamoth travel, which could mean it has to do with fast movement.
Googling suggests error code 0xc0000005 relates to closing handles in use in another thread. Here's a pretty good treatment of this general category of errors in this stack overflow stack exchange thread: gamedev.stackexchange.com/questions/110613/my-game-crashed-access-violation-0xc0000005
(Scroll down)
You can cause this problem a lot of different ways, but I'm going to suggest Wustuv's explanation is close to the truth.
Well let's see what happens with this bug. Would be nice if it's fixed pretty soon, because the game is still friggin awesome and I'd like to catch up with the last updates (I always make 2 updates break and play through again on each third one)
However, I did encounter the separate and quite unnerving "no water" bug (where, after being on land, the game forgets you're swimming in water and you fall through the water like it's air). I had to quit.
Some day, huh? But I got an hour of gameplay with no crashes.
http://forums.unknownworlds.com/discussion/146730/subnautica-crash-the-reason-the-workaround-for-players-and-a-solution-approach-for-the-devs/p1?new=1
Update on my own problem - the crashing has returned after cleaning my cache within an hour or two. If cleaning the cache buys me a few hours, it looks like I'm going to be cleaning my cache a lot.
@ThunderHawk2 See my sig for a batch file.