Hi Adam,
On 9/24/07, Adam Coates [EMAIL PROTECTED] wrote:
It looks like there's still a problem with the current setup. The
Thread object itself can get deleted before the pthread actually gets
to the lock (which, I guess is what you just added).
If I understand correctly you are saying that
Hi Adamn,
On 9/25/07, Robert Osfield [EMAIL PROTECTED] wrote:
On 9/24/07, Adam Coates [EMAIL PROTECTED] wrote:
It looks like there's still a problem with the current setup. The
Thread object itself can get deleted before the pthread actually gets
to the lock (which, I guess is what you
Hi Adam,
I have recreated the crash, and have applied a fix to
OpenThreads::Thread to resolve it. The fix involved added a Mutex to
Thread which is used to prevent the startThread and destructor running
in parallel. This certainly resolves the crash under Linux for my
tests. I have rolled
Yup - builds fine, and it resolved the crash in my system as well.
Thanks for taking care of it!!
AC
On 9/24/07, Robert Osfield [EMAIL PROTECTED] wrote:
Hi Adam,
I have recreated the crash, and have applied a fix to
OpenThreads::Thread to resolve it. The fix involved added a Mutex to
Hey, Robert,
It looks like there's still a problem with the current setup. The
Thread object itself can get deleted before the pthread actually gets
to the lock (which, I guess is what you just added). While it looks
like this doesn't cause a crash, the problem is evidenced by valgrind
(reports
Hi, Robert,
The following is sufficient (basically what you said):
#include OpenThreads/Thread
class MyThread : public OpenThreads::Thread {
public:
void run(void) { }
};
int main(int argc, char* argv[]) {
{
MyThread thread;
thread.startThread();
}
while(1) ;
return 0;
}
You
Ah - just double-checked. It'll crash just fine without adding the
usleep() to OpenThreads; I had my builds mixed up.
AC
On 9/20/07, Adam Coates [EMAIL PROTECTED] wrote:
Hi, Robert,
The following is sufficient (basically what you said):
#include OpenThreads/Thread
class MyThread :
Hi Adam,
Could you send the exact code that you can recreate the issue with.
Robert.
On 9/20/07, Adam Coates [EMAIL PROTECTED] wrote:
Ah - just double-checked. It'll crash just fine without adding the
usleep() to OpenThreads; I had my builds mixed up.
AC
On 9/20/07, Adam Coates [EMAIL
I've attached the version I'm using that demonstrates the unusability
of the isRunning() flag.
The code pasted into the last e-mail is all that's necessary to
illustrate the crash, though it doesn't try to avoid it using the
'isRunning' flag. You shouldn't need to modify the OpenThreads
library.
I ran into a crash caused (apprently) by OpenThreads (pthread
implementation). If you create a new thread, and then immediately
destroy it, it is possible to delete the thread before it has been
flagged as running. Thus, whoever in osgViewer is waiting on the
thread to close ends up deleting the
10 matches
Mail list logo