Hi Antonio,

On Thu, 2007-09-06 at 18:14 +0200, Antonio Bleile wrote:
> Antonio Bleile wrote:
> Mh.... ehh..... uuuuh..... I found the bug. I am the one to blame on
> this. So here's the story: I had an osg object as static variable in my
> library, on startup that variable was allocated. The variable was still
> allocated also after calling osgExit(), and so, calling exit caused the
> destruction of that static variable. I guess that OpenSG crashes this
> way when you dealloc a Ptr after osgExit has been called. How hard is
> it to add a check on that?

It probably would be sufficient to check the value of GlobalSystemState
in the right place - FieldContainerPtrBase::subRef and
FieldContainerPtrBase::doSubRef.
I guess the correct way to handle a situation like this is to register a
function that subrefs the static object with addSystemExitFunction (see
Source/Base/Base/OSGBaseFunctions.h).

> Regards & apologies for the noise,

Please, no need to apologize, this is a tricky aspect of the system and
as you can see from my vague comments above I'm not intimately familiar
with all the assumptions that apply to these functions.

        Regards,
                Carsten


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to