Kinect SDK在后台线程上崩溃没有明显的原因

时间:2012-08-06 15:17:15

标签: c++ kinect

Kinect SDK在打开NuiImageStream时会抛出访问冲突异常。我检查过,所有指针都有效;异常抛出不在我的线程上;但是在Kinect SDK运行的后台线程上。有什么想法吗?


int _tmain(int argc, _TCHAR* argv[])
{
    INuiSensor* sensor;
    NuiCreateSensorByIndex(0,&sensor);
    HRESULT ps = sensor->NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX|NUI_INITIALIZE_FLAG_USES_COLOR|NUI_INITIALIZE_FLAG_USES_SKELETON);
    HANDLE mvent = CreateEvent(NULL,FALSE,FALSE,NULL);
    HANDLE streamHandle;
    HRESULT ur = sensor->NuiImageStreamOpen(NUI_IMAGE_TYPE_COLOR,NUI_IMAGE_RESOLUTION_640x480,0,2,mvent,&streamHandle);

1 个答案:

答案 0 :(得分:0)

重新安装SDK修复了问题。