Search Unity

Unity 5.1.2P2 - VR Crash - 100% Of The Time

Discussion in 'AR/VR (XR) Discussion' started by scottb9239, Aug 1, 2015.

  1. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hi all, I just upgraded to Unity 5.1.2P2 and my VR project crashes on play or on build every time. I made a brand new project, didn't change/add anything and found out that just by checking "VR Supported" in the Player Settings and then hitting play makes Unity crash every time with a "Read from location 00000008 caused an access violation" in the error.log generated.

    I tried using Unity 5.1.2 (official, not patch) and did the same, new project, clicked "VR Supported", hit play and all was good. I did notice something a little odd though, when clicking "VR Supported" in 5.1.2, this dialog popped up:

    "Changing editor vr device

    Changing active VR API requires reloading all graphics objects, it might take a while"

    But this never came up in 5.1.2P2 and both versions of Unity were set to the default PC platform.

    Anyone else encountering something like this?

    Scott
     
  2. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    I should also note that I do not have an Oculus Rift connected, only developing for Gear VR. Also I tried re-installing Unity 5.1.2P2 again. Also 5.1.2P1 worked fine.
     
    Last edited: Aug 2, 2015
  3. scottunity

    scottunity

    Joined:
    Feb 1, 2014
    Posts:
    72
    Similar errors happening on Mac version (building for Gear VR)
     
    scottb9239 likes this.
  4. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hopefully we hear something on this as I'd like to take advantage of the new VR updates.
     
  5. HASH280689

    HASH280689

    Joined:
    Feb 26, 2014
    Posts:
    3
    *BUMP* I've had the same problem when I press play. Without warning Unity will crash and throw the following:

    Unity.exe caused an Access Violation (0xc0000005)
    in module Unity.exe at 0033:41230586.

    I am also using Unity 5.1.2P2
     
  6. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Same here, hard crash when hitting play in editor with VR enabled...5.1.2p2
    - gtx980 -win8
     
  7. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    This issue will be fixed in the next patch release. Some changes were make within the Plugin and Editor code that conflicted with each other. They caused Cleanup to be called even though nothing was initialized. So we were trying to cleanup invalid memory.
     
    jamh and DrewMedina like this.
  8. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Cool, thanks for the update :)
     
  9. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Thank you Ed, super appreciate the update... I thought I was doing something wrong! :)
     
  10. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Don't suppose we can get a rough ETA on this?

    Need to tell a client whether it's going to be days, weeks or months ideally :).
     
  11. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    @timsk: I'd imagine it would be sometime this week, they tend to do weekly patches from my past experience.
     
  12. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    311
    @timsk Check Here Later today. The next patch should be coming out today.

    Also, as scottb9239 said, patches come out weekly. Patches are the ones labeled with a p (Example: 5.1.2p1) as opposed to Final release labeled with an f (Example: 5.1.2f1). Patches contain some bug fixes. Final releases contain small features and the patched bug fixes. Each patch contains the previous patch's fixes as well as additional fixes. (Example: 5.1.2p1 starts the patches for 5.1.2f1 and 5.1.2p2 would contain all of p1's fixes plus additional ones.) After a few patches have been made to the same final release, we move up to the next final release so 5.1.3f1 will come after a few patches to 5.1.2f1. And then the cycle continues.

    Also, please note that the Editor Auto Update feature does not pick up Patch releases. It only sees final releases. And the patch releases are full Editor downloads.
     
    davem250 and scottb9239 like this.
  13. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Awesome, thanks for the update!
     
    scottb9239 likes this.
  14. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    Last edited: Aug 5, 2015
  15. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Confirming fixed for me in 5.1.2p3 (64 bit windows).
     
    scottb9239 likes this.
  16. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Yep, 5.1.2P3 is working great, thanks! :)
     
  17. HankySpanky

    HankySpanky

    Joined:
    Feb 3, 2015
    Posts:
    77
    I just upgraded to 5.1.2P3 but it's still crashing for me. Are you by any chance using version 0.6.0 or older of the runtime?

    I've just discovered that 0.6.1, which I'm using is supposedly unstable with one of the newer Nvidia drivers. But from what I can gather, it's been a while since that became apparent so they might have fixed whatever was causing it in a later driver.
     
  18. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hey, I'm using 0.6.0.1 on the runtime, is that what you meant? I'm only developing on Gear VR, not rift.
     
  19. HankySpanky

    HankySpanky

    Joined:
    Feb 3, 2015
    Posts:
    77
    Sorry, yes. The current version of the runtime. 0.6.0.1.
    As soon as I updated, Unity crashes whenever I start up a scene with VR enabled.
    As far as GearVR goes, I figured the root of the problem might lie in a similar area.
     
  20. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Hmm, odd. Are you trying a brand new project to test it out? If not, try making a new project, make sure you're using 5.1.2P3 and click VR Supported then click play. That "should" work.
     
  21. HankySpanky

    HankySpanky

    Joined:
    Feb 3, 2015
    Posts:
    77
    It's an old project that started out pre-5.0. We used to depend on the old OVR package until the update, at which point we cleared everything for the native support.
    Before I updated to the new runtime and updated the graphics driver, the Oculus ran just fine. Albeit, the framerate was hampered between 68 - 80 frames per second, even in an empty scene. Which is the main reason I updated the project as well as the runtime.

    I'll try creating a fresh project like you say though to see if the problem re-emerges, thanks.
     
  22. scottb9239

    scottb9239

    Joined:
    Jan 5, 2013
    Posts:
    107
    Make sure the whole OVR directory is gone and everything in the Plugins directory EXCEPT for your sig file at Plugins/Android/assets.
     
  23. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    I have dual native VR camera setup for having content in left or right eye. But whenever I try it, it crashes instandly. I don't know if this is related to the problem you described or that it's related to native VR dual setup. Can you check that?
    I accidently made a topic on wrong forum about it. Asked for a move, but I posted a bug case number.

    http://forum.unity3d.com/threads/vr-native-camera-dual-setup-crashes-topic-move-request.346833/
     
  24. HFInteractive

    HFInteractive

    Joined:
    Aug 19, 2014
    Posts:
    1
    Hello,

    Same thing happening to me with Unity 5.1.2f1 with platform set to iOS.

    I've noticed in the ProjectSettings/ProjectSettings.asset file, the flag virtualRealitySupported is set to one even when switching to iOS platform (doesn't make sense) and even if I first switch to, let's say, PC, turn the VR support off and then switch back to iOS.

    My fix was to manually edit the ProjectSettings.asset file by setting virtualRealitySupported: 0 and this solved the issue
     
  25. m3da

    m3da

    Joined:
    Aug 31, 2015
    Posts:
    19
    Just started having this problem.

    everything was working fine only 10-20 mins ago.

    as soon as i hit play/build it crashes.

    Virtual reality is supported and im doing this project for the DK2..

    Below is attached dump file.

    OVRPlugin.dll caused an Access Violation (0xc0000005)

    in module OVRPlugin.dll at 0033:f7ed3a3c.
     
  26. zivschneiderz

    zivschneiderz

    Joined:
    May 2, 2015
    Posts:
    6
    I have a similar problem and could really use your help.

    Mac OSX
    Unity Personal 5.1.2f1
    Building for GearVR
    Trying to play one of the OVR examples in the editor and it crashes every time.
     
  27. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Unity.exe caused an Access Violation (0xc0000005)
    in module Unity.exe at 0033:41230586.

    in 5.2.1
     
  28. opticmaster

    opticmaster

    Joined:
    Jan 6, 2014
    Posts:
    5
    Similar problem here but with even more weird behaviour. If I restart the computer first 2-3 times the app will crash after 3-5 seconds but after that it runs well as long the computer is not turned off .... :)