ofxKinect stops updating when cpu is overloaded

i have two OF apps running on the same mac mini (2010 version)

one is an app that converts the depth + rgb images from the kinect to single RGBA images to save to disk https://github.com/kylemcdonald/TheJanusMachine/tree/experimental/CaptureAppKinectOnly/src

another is a ton of particles swarming about to visualize those saved images https://github.com/kylemcdonald/TheJanusMachine/tree/experimental/VisualizationApp

unfortunately the whole scan + visualize process seems to work only once or twice, and then the kinect stops updating the images it’s sending. but it still reports isConnected() as true.

i don’t have the mac mini with me any more, and am having trouble recreating it on my laptop, so i wanted to ask if anyone has had similar issues where ofxKinect stops updating when you’re doing a ton of other stuff with the CPU?

i’ve seen it stoping several times while teaching a workshop with old imacs, they weren’t even doing nothing too cpu consuming, just executing the example

i think i found a hint on this post https://groups.google.com/group/openkinect/msg/9d78e24063033a6c

it says what i suspected, that the usb transfers get stalled and stop transferring. there’s a hack to restart it, and i have that in a branch of ofxKinect atm https://github.com/ofTheo/ofxKinect/tree/fix-isochronous

would be glad to hear any thoughts from other people dealing with this – or, arturo, if you do this again on old imacs :slight_smile:

so it’s an OSX only libusb thing, right? I’m using it on linux and I’ve been running the code for hours without noticing anything suspect.

(…I hope I did not provoke Murphy’s Law with my last statement… :wink: )

yes, apparently it’s osx only (according to that post).

i’m about to finish a linux 64 kinect install that is supposed to run 24/7, so i certainly hope you didn’t invoke murphy’s law… :wink:

We’ve seen this happen too on OS X.

For some reason it seems like it depends on the device. On one installation we have kinect going for 10 hours a day and haven’t seen it quit once.

On another it would cut out frequently. This was using the exact same code but a different Kinect camera.

We’re going to look at the fix Kyle posted to see if it helps…

I’m having this problem too on my old mac book pro. I tried the posted solution but that didn’t work very well. I’m thinking instead of closing then opening the connection every minute or so.