none
DepthStream.OpenNextFrame throwing error in my app, but not Microsoft example RRS feed

  • Question

  • Hello all.

    I have been tinkering with the BasicInteractions-WPF example (v1.6 SDK), and moved some of the Silhouette code over to my app.  I tested it yesterday and it worked.  Today I get a crazy long error when I call DepthStream.OpenNextFrame(15).  I don't think I changed anything... I can't remember doing so, but this now pops up:

    Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Kinect.Interop.INuiFrameTexture'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{13EA17F5-FF2E-4670-9EE5-1297A6E880D1}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

    When I run the BasicInteractions-WPF app, everything works great.  It is just in my app.

    Any help is tracking down the problem is greatly appreciated!

    Friday, October 19, 2012 5:53 PM

All replies

  • Hi ECM,

    I am experiencing the same exception and I noticed that this is happening when I call the API

    CoordinateMapper.MapColorFrameToDepthFrame and when I am trying to move from the polling approach OpenNextFrame to event approach "this.sensor.DepthFrameReady += sensor_DepthFrameReady;"

    I am trying to investigate the issue atm. not sure this helps you or (in case you solved your issue) you may want to share your experience.

    Thanks


    Tuesday, January 15, 2013 11:21 AM
  • Hi ECM,

    I solved my issue forcing a Dispose of the KinectSensor object. In my case was attempting to swap between the polling mode and the event driven mode.

    I avoided the exception nesting the code raising the exception itself in a try-catch construct. Having said so to manage the 

    this.sensor.DepthFrameReady += sensor_DepthFrameReady;

    this.sensor.DepthFrameReady -= sensor_DepthFrameReady;

    type of swap I had to call the Dispose. this solved my issue

    Tuesday, January 15, 2013 11:53 AM