none
NuiCreateSensorByIndex() function and Kinect10.dll load problem RRS feed

  • Question

  • Hello, I have a question about NuiCreateSensorByIndex() function.

    I referenced CreateFirstConnected() function in the speechSampleProject.

    To create sensor, I want to use NuiCreateSonsorByIndex() and for this, I get count from NuiGetSensorCount() function.

    In this code, NuiGetSensorCount() returns 1, and NuiCreateSonsorByIndex(0, &pNuiSensor) is executed.

    Return value is (HRESULT) S_OK, but pNuiSensor gets <Information not available, no symbols loaded for Kinect10.dll> message.

    I was trying to figure out what was the problem by comparing speech sample project, but I can't solve this problem.

    What can I do?

       
        INuiSensor * pNuiSensor;
        HRESULT hr;
    
        int iSensorCount = 0;
        hr = NuiGetSensorCount(&iSensorCount);
        if (FAILED(hr))
        {
            return hr;
        }
    
        // Look at each Kinect sensor
        for (int i = 0; i < iSensorCount; ++i)
        {
            // Create the sensor so we can check status, if we can't create it, move on to the next
            hr = NuiCreateSensorByIndex(i, &pNuiSensor);


    • Edited by amposlove Thursday, February 14, 2013 6:35 PM
    Thursday, February 14, 2013 5:12 PM

Answers

  • If you run any of the speech samples do you have the same issues (either managed or unmanaged)? The sample you are referring to are using the Windows SAPI api's which is not the same as the Speech SDK. 

    Your issue is the m_pSpeechRecognizer COM object is not initialized when calling the function which is causing your crash. It may be best to review the CreateSpeechRecognizer code and check if this object is getting initialized and not loosing any reference counts. Since these are COM objects, you have to ensure your reference counts don't go to 0.

    ISpRecognizer (SAPI 5.4)
    http://msdn.microsoft.com/en-us/library/ee413260(v=VS.85).aspx

    Since this is not directly part of the Kinect SDK, if you need assistance with the SAPI api, you may want to get developer support from this link.
    http://msdn.microsoft.com/en-us/library/ee431825(v=vs.85).aspx

    The <Information not available ...> just means you don't have a symbol for the object it is referencing. There may be no public symbol for the version of the .dll you are using. 

    • Marked as answer by amposlove Friday, March 1, 2013 3:42 PM
    Friday, February 22, 2013 1:00 AM

All replies

  • Can you provide more information on what you are trying to do? Once you call NuiCreateSensorByIndex, have you initialized the sensor?

    m_pNuiSensor->NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH); // initialize for depth
    Additionally, which version of the Kinect for Windows SDK are you using?
    Thursday, February 14, 2013 10:41 PM
  • Hello, Carmine.

    I'm trying to make a speech recognition part with skeleton drawing part.

    I am using Speech SDK 11.0v & Kinect SDK 1.6v

    I did Initialize like this

    hr = m_pNuiSensor->NuiInitialize(NUI_INITIALIZE_FLAG_USES_AUDIO);

    As a result, when this program executes StartSpeechRecognition() function (it is same with sample code (speechBasics-D2D project)).

    So, I met an error message at m_pSpeechRecognizer->SetRecoState(SPRST_ACTIVE_ALWAYS);

    and, variables have those values like below pictures.

    <Body text cannot contain images or links until we are able to verify your account>

    Sorry, because of this message, I can't include images....so I write down two images' link


    http://puu.sh/24zjL

    http://puu.sh/24zky


    Thank you and have a good day.


    • Edited by amposlove Monday, February 18, 2013 3:38 PM
    Monday, February 18, 2013 3:37 PM
  • If you run any of the speech samples do you have the same issues (either managed or unmanaged)? The sample you are referring to are using the Windows SAPI api's which is not the same as the Speech SDK. 

    Your issue is the m_pSpeechRecognizer COM object is not initialized when calling the function which is causing your crash. It may be best to review the CreateSpeechRecognizer code and check if this object is getting initialized and not loosing any reference counts. Since these are COM objects, you have to ensure your reference counts don't go to 0.

    ISpRecognizer (SAPI 5.4)
    http://msdn.microsoft.com/en-us/library/ee413260(v=VS.85).aspx

    Since this is not directly part of the Kinect SDK, if you need assistance with the SAPI api, you may want to get developer support from this link.
    http://msdn.microsoft.com/en-us/library/ee431825(v=vs.85).aspx

    The <Information not available ...> just means you don't have a symbol for the object it is referencing. There may be no public symbol for the version of the .dll you are using. 

    • Marked as answer by amposlove Friday, March 1, 2013 3:42 PM
    Friday, February 22, 2013 1:00 AM