[bug] Initialization & deinitialization of SDK two or more times leads to crash on app shutdown
Repro steps:
- go to OculusRoomTiny (GL) sample and locate main.cpp
- modify WinMain (just add the loop):
int WINAPI WinMain(HINSTANCE hinst, HINSTANCE, LPSTR, int){ int c = 0; do { // Initializes LibOVR, and the Rift ovrInitParams initParams = { ovrInit_RequestVersion | ovrInit_FocusAware, OVR_MINOR_VERSION, NULL, 0, 0 }; ovrResult result = ovr_Initialize(&initParams); VALIDATE(OVR_SUCCESS(result), "Failed to initialize libOVR.");
VALIDATE(Platform.InitWindow(hinst, L"Oculus Room Tiny (GL)"), "Failed to open window.");
Platform.Run(MainLoop); ovr_Shutdown(); } while (++c != 2);
return(0);
}- compile & run it, close it 2 times
- crash!!! in static deinitialization section of the app
Exception thrown at 0x7B3A1216 (nvapi.dll) in OculusRoomTiny (GL).exe: 0xC0000005: Access violation reading location 0x5FB55D2C.
Looks like crash in nvidia drivers.
