Kinect SDK throws exeception RRS feed

  • Question

  • Hi,

    My APP was running very nicely and suddenly in QA cycle it was found that it does not work any more. KinectSensor.GetDefault() throws Invalid Operation error. I did all sanity check. Device manager shows the device is registered. KinectMonitor service is running.

    Any idea why it is crashing ?

    Application: WinAppKinectServer.exe

    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.InvalidOperationException
       at KinectExceptionHelper.CheckHr(Int32)
       at Microsoft.Kinect.KinectSensor.GetDefault()
       at Stratacache.Kinect.Start()
       at Stratacache.GestureEngine.Start(System.String[])
       at StratacacheKinectServer.App.App_Startup(System.Object, System.Windows.StartupEventArgs)
       at System.Windows.Application.<.ctor>b__1(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run()

       at StratacacheKinectServer.App.Main()

    Faulting application name: WinAppKinectServer.exe, version:, time stamp: 0x54405ec7
    Faulting module name: KERNELBASE.dll, version: 6.3.9600.17278, time stamp: 0x53eebf2e
    Exception code: 0xe0434352
    Fault offset: 0x000000000000606c
    Faulting process id: 0x970
    Faulting application start time: 0x01cff7b2dc810bef
    Faulting application path: C:\Program Files\XXX\bin\WinAppKinectServer.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: 1a4ef57d-63a6-11e4-8266-00018081e8f1
    Faulting package full name: 
    Faulting package-relative application ID: 

    Monday, November 3, 2014 10:52 PM

All replies

  • I even tried to reinstall the SDK but no luck. None of the sample programs are also working.
    Monday, November 3, 2014 11:06 PM
  • Can you run Kinect configuration verifier found in your SDK Tools folder and provide us with the details? This will let you know if the Device is supported on this particular system, or what could be wrong with it.


    Sr. Enterprise Architect | Trainer | Consultant | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer |blog:

    Tuesday, November 4, 2014 2:13 PM
  • As I said this has been working before but now it is not working. So I wonder why it suddenly stopped. 

    Tuesday, November 4, 2014 3:07 PM
  • One change I did to the system is to install Public Release of Kinect SDK. I had some later dev version of SDK "KinectSDK-MainV2-Setup.DAILY" downloaded on August 5th 2014. For some reason that version does not seem to be working. 

    But on new version I have two identical systems : One system is giving 30 FPS rock solid. But on other it drops the frames every 15 secs.

    Tuesday, November 4, 2014 10:29 PM
  • Regardless of what is happening in the runtime or device level, you should never be crashing on this call. The api is designed to work regardless of whether the sensor is connected or not, providing you have installed the driver and runtime at a minimum and you application was compiled with the release SDK/binaries.

    The SDK as of August release, the SDK is using an uncompressed color stream which requires that the system handle more data. Depending on the physical hardware configuration of the system, it may we a bus bandwidth constraint. Testing on different hardware should confirm if this is system or device related.

    Carmine Sirignano - MSFT

    Thursday, November 6, 2014 12:24 AM
  • I am facing the same exact issue; the call to KinectSensor.GetDefault() started throwing the same exception about a week ago.

    It should be noted that I verified the Kinect's connection to my computer - it works fine in KinectStudio.

    • Edited by ahollenbach Thursday, November 6, 2014 1:29 PM
    Thursday, November 6, 2014 1:28 PM
  • I think in my case I had compiled the app with later version (nightly) version of SDK and it worked fine till Windows update downloaded the driver and runtime of public release. So there was a conflict.

    But then I recompiled my app Public release SDK and it works fine!!

    Thursday, November 6, 2014 4:54 PM
  • I am experiencing the same problem. Due to some problem, KinectSensor.GetDefault() throws exception.

    Kinect studio also shows nothing.

    Thursday, November 6, 2014 7:12 PM
  • What SDK are you using ? Public release or some nightly builld version ?
    Thursday, November 6, 2014 10:18 PM
  • I am (was) using SDK version 1408 as kinect constantly freezes in 1409.

    Now with 1408 and completely formatted computer and never connected to internet the same kinect does not work. No image in kinect studio.

    I have to use 1409 to get any image but then it freezes and starts to recapture very annoyingly.

    It is like all of a sudden my kinect has become incompatible with SDK 1408. 

    Thursday, November 6, 2014 10:52 PM
  • I will share what I did. By the way do not use Remote desktop. With RDP Kinect stops in between. Look at

    Any ways back to Troubleshooting :

    Wipe off the machine as you did. 

    If possible then choose "I will install Windows Update myself". No auto windows update so that you can control what goes.

    Then downloaded Configuration Verifier from

    Windows Update : I Upgraded the Intel HD4600 Graphic driver (This was very important otherwise I was getting insufficient frame rate warning). Depending on your GPU upgrade graphic card driver. 

    Windows Update : Upgraded Kinect driver (this downloads runtime and driver)

    Now run Kinect configuation verifier :

    C:\Program Files (x86)\Microsoft Kinect Configuration Verifier\KinectV2ConfigurationVerifier

    Look at "Verify Kinect Depth And Color streams".

    You should get 30 FPS rock solid. 

    Thursday, November 6, 2014 11:45 PM
  • Hi Nilesh,

    I will try your steps. At the moment configuration verifier tells me everything is fine and then when it starts to freeze, it tells me FPS is lower than it should be. Basically confirms what I am observing.

    This is a very disturbing issue. As connecting a kinect to a 1409 installed computer updates some stuff ON THE KINECT and you cannot use it again in another computer with a 1408.

    It was running just fine until I tried it in another machine with 1409.

    I have tested with two different computers from scratch and only installed Kinect SDK. Nothing else is installed. So no Remote Desktop.

    Friday, November 7, 2014 9:18 AM