Hi Carsten, > > 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).
Actually I know nothing about the Text stuff in OpenSG, it is just a wild guess that the problem might be related. > > 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. I thought as much. So is there any policy on when exactly osgExit should be called? Meanwhile I will try to move the call in my code, not sure if that will break anything else. > Can you try changing the line: > > OSG_SINGLETON_INST(TextFaceFactoryBase, addPostFactoryExitFunction) > > to > > OSG_SINGLETON_INST(TextFaceFactoryBase, addPreFactoryExitFunction) > > in Source/System/Text/OSGTextFaceFactory.cpp? I just did, no change. Exactly the same crash at the same location. However the stupid debugger doesn't let me look at the code to see what exactly is the problem, I will try to convince him ;-) Aloha, Andi ------------------------------------------------------------------------------ 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 Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users