Hello Andreas,

Andreas Halm wrote:
>>> 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.

osgInit registers osgExit as an atexit handler, so removing the call 
will not necessarily get rid of the call ;)
In general osgExit should be called when you are done using OpenSG and 
have given up all references to OpenSG objects. The fact that the 
TextFaceFactory contains a cache and may reference OpenSG objects itself 
should not really matter here, the order things get taken down by 
osgExit should make sure this "just works", but it seems you've found a 
bug in there...

>> 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 ;-)

ok, that would be helpful; if it was a problem with the cached OpenSG 
objects I would have expected the above to fix it, so either it is 
something else entirely (perhaps  the HDC thing after all?) or the 
caching is more involved than I thought it was.

        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

Reply via email to