none
Kinect in vanilla C - crashes on NuiSkeletonGetNextFrame RRS feed

  • Question

  • Hi Guys,

    Having problems migrating my code (which worked fine with the research beta SDK) to the new one.

    Getting an access violation after a number of succesfull NuiSkeletonGetNextFrame calls.

    Test case is simple ..

    .. load Microsoft.Kinect.Dll and grab function pointers ..

     

    NuiInitialize(NUI_INITIALIZE_FLAG_USES_SKELETON);  // returns S_OK
    NuiSkeletonTrackingEnable(0,0); // returns S_OK
    
    NuiSkeletonGetNextFrame(10000, &skeletonframe); // returns S_OK, data looks ok
    
    NuiSkeletonGetNextFrame(10000, &skeletonframe); // returns S_OK, data looks ok
    
    NuiSkeletonGetNextFrame(10000, &skeletonframe); // doesn't return - crashes.
    
    
    

    am I missing something obvious ?

    Thursday, February 2, 2012 6:28 AM

Answers

  • Just to follow up - turns out I was missing something obvious.

    My old code was interfacing to one of the earlier drivers (via MSRKINECTNUI.DLL). That

    DLL was using cdecl calling conventions. The new (Kinect10.DLL) has stdcall. It's purely accidental

    that the first few calls did not destroy my stack. All working fine now.

     

    Cheers.

    • Marked as answer by marduk2 Friday, February 3, 2012 7:21 AM
    Friday, February 3, 2012 6:55 AM

All replies

  • use to do it in a separate thread

    but i think you need to call release frame for each get frame


    • Edited by TheMaa Thursday, February 2, 2012 10:59 PM
    Thursday, February 2, 2012 10:58 PM
  • Just to follow up - turns out I was missing something obvious.

    My old code was interfacing to one of the earlier drivers (via MSRKINECTNUI.DLL). That

    DLL was using cdecl calling conventions. The new (Kinect10.DLL) has stdcall. It's purely accidental

    that the first few calls did not destroy my stack. All working fine now.

     

    Cheers.

    • Marked as answer by marduk2 Friday, February 3, 2012 7:21 AM
    Friday, February 3, 2012 6:55 AM