none
Kinect Initialization return "This API has returned an exception from an HRESULT: 0x80004005" RRS feed

  • Question

  • Hi There,

       I'm having a weird issue on Kinect.. I have a simple application, which I'm trying to track skeletons. the problem is that 95% of the times, when I call KinectSensor.Start(), it hangs for a few seconds as if it is initializing and then returns:

    This API has returned an exception from an HRESULT: 0x80004005
       at Microsoft.Kinect.KinectExceptionHelper.CheckHr(Int32 hr)
       at Microsoft.Kinect.NuiSensor.NuiInitialize(UInt32 dwFlags)
       at Microsoft.Kinect.KinectSensor.Initialize(SensorOptionsoptions)
       at Microsoft.Kinect.KinectSensor.Start()
       at UAMKinect.BOClasses.UAMSensor.Starta(Object param) in c:\Sources\UAM\KinectVa\KinectMain\BOClasses\UAMSensor.cs:line 236

    -------------------------------------
    InnerException
    -------------------------------------
    Error HRESULT E_FAIL has been returned from a call to a COM component.


    I have no idea why is this happening nor how to fix it.. I have read on the web other people having this and they say to re-install SDK/VS (Which I did), but did not solve the problem. One thing I've noticed though is that on my windows 8 (and windows 7) it does not show the "Kinect Device" (like I seen it show on someone's machine when looking for this problem on the web) under Kinect for Windows on Device manager.. this is what I see:

    Kinect for Windows

    |---- Kinect for Windows Audio Array Control

    |---- Kinect for Windows Camera

    |---- Kinect for Windows Security Control

    Not sure if this is normal (new drivers) or a sign to the problem..

    Also another thing to notice is that the Demos from the toolkit all crash with the same error, so I don't think this is something with my code (yet :) )..

    Can anyone shed some light on this issue and help me troubleshoot it.


    SDKs I have tried(in order of trial):

    1.6

    1.5

    1.0


    For SDK 1.0, I receive "The device does not recognize the command. (Exception from HRESULT: 0x80070016)" error instead..

    In all cases, the Microsoft.Kinect.KinectSensor.KinectSensors[0].Status is "Connected" and the green light is solid On at all times.

    I also have tried deleting the drivers, then disconnecting and reconnecting the Kinect so it re-installs everything with no luck.

    Any help is really appreciated.

    Mac

    Sunday, November 4, 2012 3:43 PM

Answers

  • I found out what wat causing my problem. We initialized the Kinect sensor in a secondary thread so a loading screen can stay active during time consuming tasks. This causes the COM exception. Moving the KinectSensor initialization to the main thread fixed it for us and also the following issue:

    http://social.msdn.microsoft.com/Forums/en-US/037de170-06fb-44f1-9e7e-f33f7296a77c/application-loses-stream-after-kinect-studio-loops

    Thursday, July 4, 2013 7:46 AM

All replies

  • do any of the samples work?
    Tuesday, November 6, 2012 7:46 PM
  • oh, I see that you said the demos crashed as well. What is the make/model of the USB host controller? Do you have anything else connected to it?
    Tuesday, November 6, 2012 11:12 PM
  • Hey Todd,

     So the controller is a "Intel ICH10 Family USB Universal Controller".. I have tried on ALL USB ports (including a hub), all with the same results.. my Mobo is an ASUS p5qc (in case it helps isolating the issue). I don't know if this helps but the same Kinect device on another PC works :P

     On my usb ports I have:

     1 USB 2.0 hub

     1 MS Natural Keyboard 4000

     1 Logitech Performance MS mouse

     1 Logitech 930 series headset.

     and the eventual Pendrive and external drives.. I have tried disconnecting them (except mouse, of course :) ) and the issue still the same.

    I'm really lost on what to do.. clearly is some setup on this PC since on both windows (7&8, 64bit) it fail with the same problem, but connecting to a different (for testing) pc, it works.

    Any ideas?

    Thanks in advance!

    Mac

    Wednesday, November 7, 2012 12:52 AM
  • you don't have any other Kinect (openNi / Nite) drivers installed do you? Can you try uninstalling everything, going to the latest 1.6 relesae, and running a sample with Device Manager open to see if the sensor falls of the bus?

    Thursday, November 8, 2012 6:47 PM
  • Hey Todd,

     I started with a clean Windows 8, only visual studio 2012 installed (no Kinect driver/software at all). Then before plugging in the Kinect, I have downloaded and installed the SDK and the toolkit 1.6... Then started having this issue right away (not even demos were working). Then I checked with a friend that is also developing this same app with me, and he had SDK 1.5 installed, so I went and uninstalled 1.6 and installed 1.5.. Same problem was reproducing.. then I started "googleing", and found this post where the person said his Kinect device was falling off the bus all the time, so I checked mine and sure enough, Kinect camera was falling off the bus.. then I removed the 1.5 sdk + toolkit, removed the Kinect devices (checking the option to delete the driver files) and removed 1 by 1 all 3 entries.. rebooted my machine, re-installed 1.5 and plugged Kinect.. it found and installed Array, camera and security devices, but camera kept falling off the bus even after re-install. so I removed everything again and tried 1.0, with same results.

     I have never installed anything but the official SDK and toolkit provided on the official site. I will try what you mentioned tomorrow morning (try a sample app with device manager open), but I can tell you right now that I see the camera falling off the bus even if nothing is running.

     If there is any log I can generate or any tool that can monitor these devices to see what can be going wrong, please tell me and I will install them, because at this point nothing works so anything will be something :)

    Thanks in advance for the help!

    Mac

     

    Friday, November 9, 2012 1:13 AM
  • I'm still digging into this... looking for info on that host controller.
    Saturday, November 10, 2012 4:45 AM
  • Hey Todd,

      So I have tried and as expected the problem is the same. If there is anything I can do to provide you more information please let me know, I'm still trying to get this working :)

    Saturday, November 10, 2012 11:26 PM
  • We did some investigation. The chipset of that issued machine is Intel P45. We don't have it, but we have a very similar one, Intel Q45 in our lab, with same ICH10. The issue doesn't reproduce on the machine with Q45. The difference between Q45 and P45 is that Q45 has a integrated video card. We suggest that you upgrade the USB controller driver to the latest one; and also upgrade the video card driver to latest as well.
    Monday, November 12, 2012 5:52 PM
  • First of all, I would like to apologize for the time taken to answer, I was trying out the installation as you recommended, but unfortunately I don't have good news.

     I already had the latest video drivers (NVidia's 306.97). I tried re-installing it with no success.

    So I moved on, updating the USB drivers.. My first attempt was to simply go on the USB device, and try to hit "update drivers" and select online so it would attempt to download a new version. That resulted in "your drivers are already up-to-date". 

    Then I started looking for an USB driver provided by either Intel or Asus. I could not find a driver for P45 on the intel site and the driver for Q45 would refuse to install on my machine. So I found Asus driver through the chipset installation for my motherboard's model (which amazingly was a Intel installer.. go figure :) ). I have downloaded and attempted to install the "Intel_ChipsetInf_V9111014_XPVistaWin7". The installer went through and it did seemed to update the USB driver (it would show "installing ICH10 driver" in the progress dialog), but after a reboot, and a test attempt I saw the problem persisted.

    As a last (desperate) attempt, I started digging into the driver's package and found a usb folder, inside that I found a setup for 64bit, I ran the setup file and I immediately got "This windows version (6.2) is not supported".

    Then I went to my windows 7 and tried all the same steps with the exact same result (it would say "this windows version (6.1) is not supported".

    So I guess I'm back to square one somehow, the USB drivers I found (assuming they are correct) refuse to properly install on my machine and windows update says the latest drivers are already installed.

    I actually went to my BIOS settings and played around with USB Settings (disabled and enabled the options) with no success..

    I'm really amazed with this one... This is the first device I plug on my machine that refuses to work properly, I'm certain the problem is not the device though.. but I cannot think of anything else to try..

    Thursday, November 15, 2012 2:27 AM
  • I'm having almost the same problem here, every so often it will start throwing these 0x80070016 COM exceptions. The weird thing is that the samples still run fine.

    The Kinect for Windows is connected to the following controller:

    "Intel(R) N10/ICH7 Family USB2 Enhanced Host Controller"

    The machine also has the following controllers which are probably not adequate:

    "Intel(R) N10/ICH7 Family USB Universal Host Controller"

    I tried updating the driver for both of these, but they were already up to date. The motherboard is an MSI MS-7529

    I should note that before when I used the Xbox Kinect the computer would reboot itself every so often..


    • Edited by Woutur Tuesday, July 2, 2013 2:47 PM added motherboard and driver info
    Tuesday, July 2, 2013 2:35 PM
  • I found out what wat causing my problem. We initialized the Kinect sensor in a secondary thread so a loading screen can stay active during time consuming tasks. This causes the COM exception. Moving the KinectSensor initialization to the main thread fixed it for us and also the following issue:

    http://social.msdn.microsoft.com/Forums/en-US/037de170-06fb-44f1-9e7e-f33f7296a77c/application-loses-stream-after-kinect-studio-loops

    Thursday, July 4, 2013 7:46 AM