Hi Tanguy, On Thu, Aug 6, 2009 at 12:53 PM, Tanguy Fautre<tang...@aristechnologies.com> wrote: > Unfortunately serializing the access to getenv() is not likely to solve > the issue. The problem is not that OSG calls several getenv() in > parallel, the problem is that getenv() should not be called *at all* in > DllMain(). > > Serializing getenv() in OSG does not guarantee that another C function > will not be called in another thread unrelated to OSG. In fact, this is > exactly what is happening to us.
OK... but as yet I'm still not clear on why you suggestion avoids the init. Is it simple that static's in the global scope are getting initialized automatically, while ones inside methods are only initialized on first call... So you've moved the static initializer into the method... Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org