H3D.org Forum Index Programming Issues
releaseDevice error? | Register To Post |
| Threaded | Newest First | Previous Topic | Next Topic | Bottom |
| Poster | Thread |
|---|---|
| bobbie | Posted on: 2009/12/2 11:01 |
Not too shy to talk ![]() ![]() Joined: 2009/9/10 From: The Netherlands Posts: 8 |
releaseDevice error? When my application is closing it runs the destructor:
But sometimes it hangs on hd.releaseDevice(); What's wrong???? greets, Bob van Ratingen The Netherlands |
| Markus | Posted on: 2009/12/4 8:26 |
Webmaster ![]() ![]() Joined: 2006/3/27 From: SenseGraphics Posts: 1531 |
Re: releaseDevice error? Where in the releaseDevice code does it hang? (Run in debug mode in visual studio if that is what you are using). Are you using your own device (myRobot?) or one of those which HAPI/H3DAPI has support for?
|
| bobbie | Posted on: 2009/12/4 9:55 |
Not too shy to talk ![]() ![]() Joined: 2009/9/10 From: The Netherlands Posts: 8 |
Re: releaseDevice error? It hangs in DEBUG-mode and RELEASE-mode. myRobot is a REAL robot. Not important in this case. hd is a PhantomHapticsDevice.
I hope you can help me! gr. Bob van Ratingen |
| bobbie | Posted on: 2009/12/4 15:17 |
Not too shy to talk ![]() ![]() Joined: 2009/9/10 From: The Netherlands Posts: 8 |
Re: releaseDevice error? I think i have found it. I must first release the hd and than remove the threads!
still thanks, Bob |
| Markus | Posted on: 2009/12/4 16:36 |
Webmaster ![]() ![]() Joined: 2006/3/27 From: SenseGraphics Posts: 1531 |
Re: releaseDevice error? That could be it. If your threads are calling functions which interferes with the haptics rendering (such as hd->getPosition or other get functions) then it might have been the cause of your problems. Or something like that. Maybe your thread was waiting for the haptics thread to finish while at the same time the haptics thread was waiting for yours to finish.
|
| bobbie | Posted on: 2010/1/5 14:01 |
Not too shy to talk ![]() ![]() Joined: 2009/9/10 From: The Netherlands Posts: 8 |
Re: releaseDevice error? I have the same problem again!
I have a thread (ThreadControlling). Below are the first 7 lines of this thread. In the 7th line, the thread wait until the button is pressed by a Phantom. hd: PhantomHapticsDevice hd; I start this thread with this function: and stop the thread with this function: but some times when I start and stop sequence the program hangs on This is because somtimes when the thread start it pass over WHY??? THANK YOU SO MUCH!!! gr Bob van Ratingen |
| Markus | Posted on: 2010/1/8 11:11 |
Webmaster ![]() ![]() Joined: 2006/3/27 From: SenseGraphics Posts: 1531 |
Re: releaseDevice error? What do you mean with "pass over"? Does it skip the two lines you mention?
Where is this code located? Is it in the constructor or in the thread function of the thread? |
| Threaded | Newest First | Previous Topic | Next Topic | Top |
| Register To Post | |



