Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic ofxOpenNI objects with threading #38

Open
timredfern opened this issue Jul 8, 2013 · 0 comments
Open

dynamic ofxOpenNI objects with threading #38

timredfern opened this issue Jul 8, 2013 · 0 comments

Comments

@timredfern
Copy link

Hello, I've been trying to make a project that plays back .oni files by creating and deleting ofxOpenNI objects. (I find that if I initialise the objects afetr they are created then threading doesn't work, hence this approach).

I'm running into problems while deleting the objects. updateUserTracker(); is often called after the usertacker is deleted, causing a crash.

Looking at the source code, I notice this commented out statement in ofxOpenNI::stop(); , ofxOpenNI.cpp line 349

//waitForThread(true);

I've found that if I uncomment this, but comment out the mutex.lock() on line 345, creating and deleting objects works perfectly and I still get multithreaded performance.

Why was this line commented out? Does this approach cause problems elsewhere?

I'm using x64 linux and the git version of OF. I believe I'm seeing identical results on OSX with the latest published version.

Tim Redfern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant