Antonio Bleile wrote:
> Hi,
>
> I'm currently looking at a problem with osgExit...
> I use a pbuffer and a passive window to do the rendering,
> I have a class that has created an fbo object, it called
> addRefCP on that ptr and in the destructor I call subRefCP.
> The osgExit crashes when calling the subRefCP. I made
> sure that the ref counter is >0 (in my case == 1) and
> that the pointer is != NullFC. The stack trace is here:
>
>
> ntdll.dll!7c91104b()
> > OSGBaseD.dll!osg::WinThreadLockBase::aquire() Riga 379 + 0xf byte
> C++
> OSGBaseD.dll!osg::Lock::aquire() Riga 452 C++
> OSGBaseD.dll!osg::LockPool::aquire(void * keyP=0x031fc830) Riga 537
> C++
> OSGSystemD.dll!osg::FieldContainerPtrBase::subRef() Riga 127 +
> 0x15 byte C++
> OSGSystemD.dll!osg::subRefCP(const osg::FieldContainerPtrBase &
> objectP={...}) Riga 88 C++
>
>
> The line of code where it crashes is this one:
>
> EnterCriticalSection(&_pCriticalSection);
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?
Regards & apologies for the noise,
Toni
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users