none
System.Reflection.TargetInvocationException when using Microsoft.Kinect.Face RRS feed

  • General discussion

  • I'm trying to receive some face-data with the new Kinect v2 SDK.

    Therefore I used the FaceBasics-WPF Sample and tried to change it so that it works as a x86 Application. After Some Time I get a "System.Reflection.TargetInvocationException" containing a "System.AccessViolationException".

    What did I do wrong in this case?

    System.Reflection.TargetInvocationException's Stack Trace:

       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run()
       at Service.Program.Main(String[] args) in c:\Users\ChristianF\Documents\Wings AV\Wings AV Suite\Applications\Service\Program.cs:Zeile 34.
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    System.AccessViolationException
       at Microsoft.Kinect.Face.?A0x53714033.ProcessFaceTrackingData(FaceTechResult* , FaceTechProcessor* , FaceTrackingData* , UInt32 , Boolean )
       at Microsoft.Kinect.Face.FaceFrameSource.ProcessFrames(BodyFrame bodyFrame, ColorFrame colorFrame, DepthFrame depthFrame, InfraredFrame infraredFrame)
       at Microsoft.Kinect.Face.FaceFrameSource.ProcessMultiSourceFrame(MultiSourceFrame frame)
       at Microsoft.Kinect.Face.FaceFrameSource.OnMultisourceFrameArrived(Object sender, MultiSourceFrameArrivedEventArgs args)
       at ContextEventHandler`1.SendOrPostDelegate(Object state)

    I hope you can help me. - Thanks

    Tuesday, September 2, 2014 2:53 PM

All replies

  • This is currently being investigated and known by the team. Thanks for the report.

    Carmine Sirignano - MSFT

    Wednesday, September 3, 2014 12:49 AM
  • Hi,

    I know this is old. But has this error happened again? We just bumped into a System.AccessViolationException in ProcessFaceTrackingData as well, though we have been developing and deploying an .NET app for the Kinect v2 for almost two years now. I'm wondering if this is our fault or it's really a bug that occurs very rarely in the Kinect library.

    Best Regards,

    Kal

    Monday, May 30, 2016 2:49 AM