Hello Andreas,
Andreas Halm wrote:
> The debugger showed me that TextFaceFactoryBase is a Singleton and is
> destructed by the call of osgExit, but it is holding a HDC variable.
> However at that point the HDC as well as the OpenGL context are already
> destroyed.
hm, I don't know much about the lifetime requirements of these device
contexts, but at first glance it seems independent of the GL context
(there is a CreateDC call in the TextWIN32Backend c'tor).
> Is there a way to destruct all the stuff manually, or is it usually
> better to call osgExit before the window is lost?
the singletons register a cleanup function that gets called from
osgExit, calling it manually will likely result in a double free when
osgExit runs at a later point.
Can you try changing the line:
OSG_SINGLETON_INST(TextFaceFactoryBase, addPostFactoryExitFunction)
to
OSG_SINGLETON_INST(TextFaceFactoryBase, addPreFactoryExitFunction)
in Source/System/Text/OSGTextFaceFactory.cpp?
It seems like a bug to keep this around until after the
FieldContainerFactory is destroyed given that it holds various things in
caches.
Cheers,
Carsten
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users