cancel
Showing results for 
Search instead for 
Did you mean: 

LibOVRPlatform64_1.DLL caused an Access Violation (0xc0000005)

angularsen
Explorer
My little Unity game crashes almost every time when running as Windows standalone build and I don't even know where to begin to look. Apparently some internals of the OVR platform goes haywire upon starting the game, probably during the platform initialization routine.

It works fine in the Unity Editor. I can provide a repro upon request.

Stack Trace of Crashed Thread 21768:
0x00007FF99294AF42 (LibOVRPlatform64_1) ovr_RoomOptions_SetOrdering
0x00007FF99277C9F3 (LibOVRPlatform64_1) ovr_ConfigOption_CreateInternal
0x00007FF9927F6B84 (LibOVRPlatform64_1) ovr_VoipOptions_Create
0x00007FF99283B11E (LibOVRPlatform64_1) ovr_CloudStorage_DebugSyncWithCloud
0x00007FF992831720 (LibOVRPlatform64_1) ovr_CloudStorage_DebugSyncWithCloud
0x00007FF99282CD4A (LibOVRPlatform64_1) ovr_CloudStorage_DebugSyncWithCloud
0x00007FF992843D55 (LibOVRPlatform64_1) ovr_UnityTestUserGetID
0x00007FF99284252F (LibOVRPlatform64_1) ovr_UnityTestUserGetID
0x00007FF9E7CD2D04 (ntdll) RtlUnsubscribeWnfNotificationWaitForCompletion
0x00007FF9E7CAF5C9 (ntdll) RtlReleaseSRWLockExclusive
0x00007FF9E76C3034 (KERNEL32) BaseThreadInitThunk
0x00007FF9E7D01431 (ntdll) RtlUserThreadStart
1 REPLY 1

angularsen
Explorer
Copying message here as well except the link:

Unity v2018.1.6f1, Oculus Utilities v1.27.0, OVRPlugin v1.27.0, SDK v1.28.0.
    Version:  Direct3D 11.0 [level 11.1]
    Renderer: NVIDIA GeForce GTX 1070 (ID=0x1b81)
    Vendor:   
    VRAM:     8088 MB
    Driver:   24.21.13.9836

You asked about build settings, which settings and can I easily export them to you?

The best way I can repro this is to:
1. Run the demo .exe, it should work fine the first time and run a small VR scene
2. Alt+F4 to end the demo
3. Run the .exe once more immediately after

This is probably unrelated, but I usually have Unity3D open with VR scenes loaded and actively using them with Oculus Rift. Editor is in stopped state when trying to run the Windows build though.

When I tried it just now, I had to launch the app 3 times in total for it to crash and then it crashes every time after that. It seems to get in a state where I need to close the Oculus app to recover, or possibly just wait a long time. However, when I initially reported this bug I got a different stacktrace in the error report and I recall that it did NOT help to restart the Oculus app at that time. I speculated that alt+f4 was closing the app too aggressively and started using a hotkey to trigger `Application.Quit()` from Unity script instead, but no idea if there is actually anything to that.

Hope this helps.