Search Unity

Access Violation (0xc0000005)

Discussion in 'Editor & General Support' started by L4Z3RC47, Apr 9, 2017.

  1. L4Z3RC47

    L4Z3RC47

    Joined:
    Jun 21, 2015
    Posts:
    46
    I've been banging my head against a wall for a bit now with a new bug... It seems that this may be related to some system update but I'm having some problems tracking it down. This bug was first brought to my attention from some external testers when submitting our app to the Oculus store however we were unable to reproduce the crashes. Now I've updated to the latest version of Oculus Runtime and am running Unity 5.6 and I'm getting Access Violation (0xc0000005) errors. Curiously these errors seem to occur now even when VR is disabled. Also, when VR is enabled and the app is set to fullscreen I don't get a crash but Display 1 also displays no content while the headset display works. If i enable the windowed view or launch windowed for display 1 I get a crash immediately.

    Seems like a few other people have run into this issue in the past but not much luck or causes seem very broad.

    Logs are accessible here. Any help or ideas greatly appreciated!

    https://drive.google.com/open?id=0B7y0Xl5Vl7KBUkJnWmZGRnBoa00
    https://drive.google.com/open?id=0B7y0Xl5Vl7KBNndMZlZFLTc3WVU
    https://drive.google.com/open?id=0B7y0Xl5Vl7KBWjR4bEtmdk94VGM
     
  2. L4Z3RC47

    L4Z3RC47

    Joined:
    Jun 21, 2015
    Posts:
    46
    Ok, after further testing, it seems like Unity builds will crash under the following conditions.

    1. Start a VR-enabled scene with the headset unmounted.
    2. Mount the headset. Load a new scene.
    3. Unmount the headset and trigger the loading of a new scene with a VR-enabled camera (will render to eyes)

    Note: Testing with Oculus CV1, Windows 10 latest patches and NVIDIA GTX 970 with latest drivers: Oculus 1.13: Unity 5.6

    I'll follow up with any additional observations after more through testing
     
  3. hrvat

    hrvat

    Joined:
    Mar 12, 2013
    Posts:
    42
    Do you have any additional information?

    The same happens to us, we are not able to reproduce the crashes, some testers have told us that the game crashes with Access Violation (0xc0000005).
     
  4. L4Z3RC47

    L4Z3RC47

    Joined:
    Jun 21, 2015
    Posts:
    46
    So far I havent been able to track down the exact source of the problem.
    I've reverted back my Unity installation to 5.5.1 and Oculus Utilities to 1.10. This seems to have fixed all of the access errors that we were having. I havent tried updating the project to Unity 5.6 again yet but that will be my next step.
    I suspect that its an issue somewhere within the Oculus Utilities that is causing a conflict with that version of Unity. I'll update this thread if I'm able to trace down things any further.
     
  5. hrvat

    hrvat

    Joined:
    Mar 12, 2013
    Posts:
    42
    Alright,

    Some people have managed to fix the issue by going to Player settings > Settings for Android > Enable Use 32-Bit Display Buffer (even if you are not deploying for the Gear but for the Rift), however this does not solve our issue.

    Other people have said it has something to do with UI elements not having a material referenced, however if we wanted to try this solution I would have to completely change parts of the game.

    Other people have said it's a bug from 5.6, so yeah reverting to 5.5 is a solution, we will try to revert and see if that helps.

    And, it seems like this error happens in a lot of Unity games, such as Heartstone, Kerbal Space Program and its been happening in other versions of Unity, hope we can find a solution tho, 5.6 brings a lot of nice things we are currently using in the game.

    Edit - Forgot to add that also, some antivirus cause this problem, also if you haven't updated Windows or your video card drivers.
     
  6. L4Z3RC47

    L4Z3RC47

    Joined:
    Jun 21, 2015
    Posts:
    46
    Yeah, I saw probably many of the same posts youre referencing. Eventually I found a post regarding the error log that gets output (sorry not at my computer with the logs now, but I'll followup later) but basically the stack trace at the end of the log indicates that the error is a type that Unity's crash logger couldn't/didn't properly catch. Seems like Unity folks would need to be brought in to trace the memory address calls to identify the actual issue.

    Side note: I tried reverting just to 5.5 but that didn't fix the crashing for me until I reverted Oculus Utilities back to 1.10. That was the last stable combo I had back in December 2016 and I've been sticking with that one lately until I have more time to test/debug moving forward.
     
  7. L4Z3RC47

    L4Z3RC47

    Joined:
    Jun 21, 2015
    Posts:
    46