Hi,
Here is code to reproduce crash:
code
#include osgDB/ReadFile
#include OpenThreads/Mutex
#include OpenThreads/Thread
#include OpenThreads/Condition
static OpenThreads::Condition s_cond;
static OpenThreads::Mutex s_mtx;
class ReadThread : public OpenThreads::Thread
{
public:
ReadThread()
Hi Robert,
I tried to reproduce this problem on linux but without luck.
gcc use more complex method of initialization of static variables at
function scope.
So problem is only with MSVC 2008 (not sure about newer versions).
Mikhail.
05.06.2012 10:39, Mikhail I. Izmestev написал:
Hi,
Here
Hi,
MSVC not support thread safe initialization of static variables at
function scope.
GCC by default generate thread safe code, but it can generate code like
MSVC by passing -fno-threadsafe-statics option.
So you can reproduce crash if add -fno-threadsafe-statics option to
CXX_FLAGS.
Hi Mikhail,
I have moved the static into the global scope of the
osgWrappers/deprecated-dotosg/Drawable.cpp, file attached, could try
it out?
Robert.
On 2 June 2012 11:12, Mikhail I. Izmestev izmmish...@gmail.com wrote:
Hi,
I noticed crashing in dotosg wrappers when try to use
Hi Robert,
It is hard to reproduce this problem (as any thread safety problem) in
same state as previous.
I have another crash with same problem at:
ntdll!RtlEnterCriticalSection+0x6
ot12_OpenThreads!OpenThreads::Mutex::lock+0xe
osgdb_deprecated_osg!initGLNames+0x66
5 matches
Mail list logo