Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 5.6.0r3 Build crashing when Rift is plugged

Discussion in 'Editor & General Support' started by shomz, Apr 11, 2017.

  1. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Happens only with version 5.6.0r3 and only when Oculus Rift is plugged in.
    Nothing really useful in the crash logs.

    "Unhandled exception at 0x00007FF6EC930B64 (app.exe) in crash.dmp: 0xC0000005: Access violation reading location 0x0000000000000000. occurred"

    The app runs fine from editor, no errors in the console, it's just the build. Tried 32-bit, 64-bit, developer mode, non-developer mode... everything crashes shortly after launch.
    All good after unplugging Rift.

    Any idea why is this happening?
     
    Last edited: Apr 11, 2017
  2. nitz

    nitz

    Joined:
    May 4, 2011
    Posts:
    54
    Hi shomz,

    I had the same issue on 5.6.0f3. I don't have 5.6.0f1 to test, but I managed to find a workaround here.

    In short: it seems that when the HMD is not actually on the head, and there's no other camera active, it crashes.

    I added an extra camera to my scene, and set it's depth to lower than any I use and it prevents my build from crashing.

    Hope this helps!
     
  3. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    The 5.6.0 patch 1 says it fixes a VR crash upon startup. Maybe that's what you are running into.
     
  4. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Thank you, guys!
    I'll mess around with this and will let you know about the results.

    The thing is, we already have two cameras in the scene (2D and VR), so I'm not sure that solution will work, but I'll try experimenting with camera depths because I can't remember the values we're using from the top of my head.
     
  5. shomz

    shomz

    Joined:
    Nov 9, 2016
    Posts:
    16
    Changing the camera depths did prevent the crash, but unfortunately didn't work for us because we needed a 2D camera to have the lower depth than the Rift camera.

    However, I was managed to pinpoint the problem to anti-aliasing (in quality settings) - as soon as I turned it off, the crashing stopped.

    Funny how the Unity team didn't respond to this bug.