[osg-users] Hang on cooperativeWait in atexit
Anders Backman
andersb at cs.umu.se
Thu May 15 02:11:20 PDT 2008
Long time no see :-)
Using Osg 2.2.0.
WinXP, VisualStudio 2008.
I have a slight problem that I cant seem to get around.
We have a thread with a few OpenThread::Block, and in the destructor
of the thread we call block.release().
The thing is that the thread is still running when scope of main goes
out. So we have a atexit() function that does the deallocation, and
tries to delete the threads.
The problem is that one of the Blocks (we have two in the thread)
causes a hang in the call to: Condition::cooperativeWait().
This was mentioned as a problem here:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-March/009081.html
With no result as far as I can see...
Its a problem only under win32. I have seen it before, but at that
time we found a way around it (by shutting down the threads in main),
this time we don't.
Callstack:
ot9-OpenThreadsd.dll!OpenThreads::Win32ConditionPrivateData::broadcast()
Line 71 C++
ot9-OpenThreadsd.dll!OpenThreads::Condition::broadcast() Line 100 C++
agxd.dll!OpenThreads::Block::release() Line 69 + 0x13 bytes C++
agxd.dll!agx::Block::release() Line 540 C++
agxd.dll!agx::WorkThread::~WorkThread() Line 33 C++
agxd.dll!agx::WorkThread::`vector deleting destructor'() + 0x54 bytes C++
agxd.dll!agx::ThreadPool::shutdown() Line 106 + 0x2c bytes C++
So anyone seen this (and solved it) or any ideas of what might be
behind this issue?
--
________________________________________________________________
Anders Backman Email: andersb at cs.umu.se
HPC2N/VRlab Phone: +46 (0)90-786 9936
Umea university Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax: +46 90-786 6126
http://www.cs.umu.se/~andersb
More information about the osg-users
mailing list