IKinectSensor::get_IsAvailable() and KSUtil are incompatible with each other RRS feed

  • General discussion

  • I've a 100% repro that IKinectSensor::get_IsAvailable()  and  KSUtil  are incompatible with each other.

    Plug a Kinect2 into your USB3 port.

    Use KSUtil to play all the streams of an XEF file. For example:
        ksutil.exe -play myclip.xef

    While that clip is playing, start a C++ application compiled with SDK 2.0 that uses the IKinectSensor::get_IsAvailable() api. For example:

    BOOLEAN bIsAvail = false;
    hr = x->pKinect2Sensor->get_IsAvailable(&bIsAvail);

    After that code, your results will be:
    bAvail == false
    hr == S_OK

    You can wait 10 seconds after the open() of the Kinect. It will still report the Kinect is not available.

    This failure does not repro if you play the clip with Kinect Studio.


    Wednesday, December 10, 2014 10:17 AM

All replies

  • If you play the clip after your application is launched is the result different? Are you using the event to be notified of the IsAvailable change or are you polling on isAvailable?

    Carmine Sirignano - MSFT

    Wednesday, December 10, 2014 7:37 PM
  • Launching the app does not cause the failure.  Using KSUtil and calling specific APIs *does* cause the failure

    FAILURE repro rough steps

    1. ksutil.exe -play myclip.xef
    2. get default sensor
    3. open it
    4. wait/sleep any amount of time. I tested 1.5 sec and 10 sec
    5. call get_IsAvailable()

    SUCCESS repro rough steps

    1. get default sensor
    2. open it
    3. wait/sleep any amount of time. I tested 1.5 sec and 10 sec
    4. call get_IsAvailable()

    I calling the API as in the code of the original post. No event/subscription because of failures and API case gaps previously reported at


    Wednesday, December 10, 2014 9:39 PM
  • Hi Dale,

    Thanks for reporting this issue. I've sent a message to our developers to see if any of them might know why IsAvailable returns false during the playback scenario that you described. For a work-around, could you try running KSUtil *after* you start your application and open a connection to the default sensor?

    • get default sensor
    • open it
    • wait/sleep any amount of time
    • call get_IsAvailable()
    • call ksutil.exe -play myclip.xef

    This should allow you to playback clips after you know that the sensor is ready. Please let me know if this works for you.


    Thursday, December 11, 2014 12:54 AM
  • I'm able to test with a worries. I highlighted the error scenario to you. As in my post above, if you run KSUtil after... there is no failure.

    The key is *when* you run KSUtil.
    Before = death
    After = ok

    Alternately, I can use Kinect Studio which appears to work in both cases.


    Thursday, December 11, 2014 10:33 AM