joshuajnoble / ofxKinectV2

of addon for Kinect V2
47 stars 22 forks source link

Sample project throws exception when try to close the application #3

Open abuseukk opened 10 years ago

abuseukk commented 10 years ago

Hello @joshuajnoble,

Yesterday I was able to run the simple project inside VS2013. The issue is when you press Esc or close the app it crashes from the ofxKinectCommonBridge. I don't have the source codes here in the office but maybe you can find the issue easily.

Regards, Ivaylo

cyrildiagne commented 10 years ago

I'm facing the same issue but only with the x64 lib (crash when destroying the ofThread). But the win32 version exits without crashing.

joshuajnoble commented 10 years ago

Can you guys provide me with a little more info on where it's crashing? I suspect it might be in how I shut down the ofxKCB but I want to make sure before I make changes and I'm currently without a a Windows 8 machine to test (not ideal, I know)

cyrildiagne commented 10 years ago

Hey sorry in my case the problem seems to come from the win64 poco libs as the crash is reproduced by the threadExample

sachatkm9 commented 9 years ago

I ran into the same issue when running the simple project example. I fixed it simply by calling kinect.stop() before the app closes:

void testApp::close(){
 kinect.stop();
}

This way you make sure that the kinect thread is stopped before the app closes. Otherwise the main thread might destruct your kinect handle while the thread is still running and trying to access it.