[Crash] Crash due to Access Violation

ThunderHawk2ThunderHawk2 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:
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

  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Clear your cache, see my sig. If it helps, let me know.
  • ThunderHawk2ThunderHawk2 Join Date: 2016-12-19 Member: 225164Members
    edited December 2016
    As I mentioned, I did delete the two cache folders already but it didn't seem to help. I haven't tried the more advanced procedure outlined in your sig yet. I'll try it and report back.
  • WustuvWustuv Join Date: 2016-12-19 Member: 225188Members
    I think I've found the reason (should it already have been posted I apologize for the double post):
    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
  • ThunderHawk2ThunderHawk2 Join Date: 2016-12-19 Member: 225164Members
    Clearing the cache did not appear to help more than marginally. The game crashed again within a few minutes, apparently with the same error.

    @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.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    You guys might be able to find it if they've already pinpointed the bug here: https://trello.com/b/eLEWpq3P/subnautica-playtesting

    @Obraxis is any of that ^ close to target on the crashing issue?
  • WustuvWustuv Join Date: 2016-12-19 Member: 225188Members
    I just thought of that explanation because about a year or so ago I helped EGS track down a bug in Empyrion which was very similar in behaviour: In some instances the game kept loading the same objects again and again endlessly until the RAM of the server was totally full. They eventually found a bug in the object layer code which was responsible for that.
  • ThunderHawk2ThunderHawk2 Join Date: 2016-12-19 Member: 225164Members
    edited December 2016
    @0x6A7232 - I looked around the Trello page for quite a while and couldn't find anything about the access violation/fast movement crashes, though I'm not sure what it would be filed under. I did, however, learn about a lot of exciting other bugs and exploits. (Power cell charger aboard a cyclops produces infinite power. Who knew?)

    @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.
  • WustuvWustuv Join Date: 2016-12-19 Member: 225188Members
    edited December 2016
    (Power cell charger aboard a cyclops produces infinite power. Who knew?)
    Really?? I was going to try this some hours ago but thought to myself "naaaaah, that just can't work..." XD
    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)

  • ThunderHawk2ThunderHawk2 Join Date: 2016-12-19 Member: 225164Members
    edited December 2016
    New information: After reading posts from other people with the same problem saying they'd cleared the cache and it worked, I decided to try clearing the cache again. (If at first you don't succeed, right?) This time, I got a good hour of gameplay in. I went to the Mountain Island and the Precursor Facility to see if that induced a crash, and no crash!

    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.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Can you all check out my thread here and tell me if you've got other processes besides Subnautica using Subnautica resources?
  • ThunderHawk2ThunderHawk2 Join Date: 2016-12-19 Member: 225164Members
    @Wustuv, @0x6A7232 - I'll post my responses in your guy's thread.

    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.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    edited December 2016
    @Wustuv, @0x6A7232 - I'll post my responses in your guy's thread.

    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.
  • ilovemony7ilovemony7 Bolton Join Date: 2016-12-18 Member: 225147Members
    Hey i have been having exactly the same problem, never had a issue with the game until the December update. I hope either Dev team fixes this or that you guys can find a solution. I love subnautica and i really want to keep playing but the game has now been rendered useless to me.
Sign In or Register to comment.