Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
larryPlayabl's avatar
larryPlayabl
Explorer
5 years ago

Bug Report: Enabling OVRLipSync breaks catching of NullReferenceExceptions

Oculus Integration Package: v25

Unity Version: 2019.4.4f1

Operating System: osx 10.15.4

 

Reproduction Steps:

 

1. Import Oculus Integration Package v25

 

2. In a new Unity scene, add a component that includes and triggers this code which creates and catches a NullReferenceException.

 

try
{
int[] nullArray = null;
int i = nullArray[0];
}
catch (Exception e)
{
Debug.LogError("Got exception in array access: " + e.Message);
}
 
Note that the exception is properly caught and logged.
 
3. Add an OVRLipSyncContextBase component to the scene on an active game object.
 
4. Play the scene and then trigger the exception generating code above. Note that the exception is no longer caught and Unity editor crashes.
 
I have tracked the issue to this DLL call in OVRLipSync.cs. After this call, the nullref exception catching no longer works.
 
        return (Result)ovrLipSyncDll_CreateContextEx(ref context, provider, sampleRate, enableAcceleration);