ofTheo/ofxKinect — Issue #79: ofxKinect crashes now on exit
Author: ofTheo
Created: 2011-10-31 14:09:09+00:00
State: open

just noticed this since the all the new fixes. the previous develop version I was using never crashed on exit.
maybe something with the threading - need to stop the thread first?

ofxKinect* kinect = kinectContext.getKinect(dev);

if(kinect->kinectDevice == dev && kinect->lock()) {
try {
freenect_frame_mode curMode = freenect_get_current_video_mode(dev);
here ------->	memcpy(kinect->videoPixelsBack, rgb, curMode.bytes);
kinect->bNeedsUpdate = true;
}
catch (...) {
ofLog(OF_LOG_ERROR, "ofxKinect: Rgb memcpy failed for device %d",
kinect->getDeviceId());
}
kinect->unlock();
}