Search Unity

System.NotImplementedException when a PhotoCaptureFrame instantiated

Discussion in 'VR' started by tvald, Oct 31, 2018.

  1. tvald

    tvald

    Joined:
    Jul 13, 2018
    Posts:
    10
    PhotoCapture seems to trigger an internal error when it recieves a frame from the camera. (See stack trace at bottom, error is thrown from PhotoCaptureFrame's constructor inside InvokeOnCapturedPhotoToMemoryDelegate.)

    Code (csharp):
    1. Exception thrown: 'System.NotImplementedException' in WinRTBridge.dll
    2. 'testapp.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\testappVS.Release_x86.testuser\System.Diagnostics.StackTrace.dll'. Cannot find or open the PDB file.
    3. Exception: The method or operation is not implemented.
    4. Type: System.NotImplementedException
    5. Module: WinRTBridge
    6. InnerException: <No Data>
    7. AdditionalInfo:MarshalFirstFieldIntoNativePtr type: UnityEngine.XR.WSA.WebCam.PhotoCaptureFrame
    8.    at WinRTBridge.Marshalling.MarshalFirstFieldIntoNativePtr(Object instance)
    9. (Filename:  Line: 0)
    10.  
    11. Exception thrown: 'System.ArgumentNullException' in UnityEngineProxy.dll
    12. ArgumentNullException: Value cannot be null.
    13. Parameter name: _unity_self
    14.    at UnityEngineProxy.InternalCalls.PhotoCaptureFrame_CUSTOM_GetDataLength(Object self)
    15.    at UnityEngine.XR.WSA.WebCam.PhotoCaptureFrame..ctor(IntPtr nativePtr)
    16.    at UnityEngine.XR.WSA.WebCam.PhotoCapture.InvokeOnCapturedPhotoToMemoryDelegate(OnCapturedToMemoryCallback callback, Int64 hResult, IntPtr photoCaptureFramePtr)
    17.    at UnityEngine.XR.WSA.WebCam.PhotoCapture.$Invoke10(Int64 instance, Int64* args)
    18.    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    19. (Filename: <Unknown> Line: 0)
    This has been reported by other users in these MixedRealityToolkit issues:
    https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/2919
    https://github.com/Microsoft/MixedRealityToolkit/issues/182
     
  2. tvald

    tvald

    Joined:
    Jul 13, 2018
    Posts:
    10