Hi,
I am getting a crash when exiting my application. My guess is that parts of
the OSGText stuff gets deleted / destructed when the window is no longer
available.
Call stack appended at the end of this mail.
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.
Is there a way to destruct all the stuff manually, or is it usually better
to call osgExit before the window is lost?
Aloha, Andi
Debug output:
'BioSG.exe': Unloaded 'C:\Windows\SysWOW64\siappdll.dll'
'BioSG.exe': Unloaded 'C:\Windows\SysWOW64\psapi.dll'
'BioSG.exe': Unloaded 'C:\Windows\SysWOW64\spwini.dll'
'BioSG.exe': Unloaded
'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_no
ne_d08a205e442db5b5\msvcr80.dll'
'BioSG.exe': Unloaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL'
Detected living FC Image 10F79C30 refcount 1
1 out of 2876 FC's have not been destroyed
First-chance exception at 0x77b62272 in BioSG.exe: 0xC0000005: Access
violation writing location 0x00000018.
Btw I guess that the living image is also part of the text environment -
otherwise I have no idea what it could be. I set all variables to 0 before
deleting the OpenGL context and also delete the scene manager.
Call stack:
ntdll.dll!77b62272()
[Frames below may be incorrect and/or missing, no symbols
loaded for ntdll.dll]
OSGTextD.dll!OSG::TextWIN32TXFFace::`scalar deleting
destructor'() + 0x16 bytes C++
OSGBaseD.dll!OSG::MemoryObject::subRef() Line 71 + 0x22
bytes C++
OSGTextD.dll!OSG::MemObjRefCountPolicy::subRef(OSG::MemoryObject * const
objectP=0x10e76c18) Line 195 + 0xb bytes C++
OSGTextD.dll!OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>::~
RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>() Line 110 + 0xb
bytes C++
OSGTextD.dll!std::pair<std::basic_string<char,std::char_traits<char>,std::al
locator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>
>::~pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>
> const ,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> >() +
0x40 bytes C++
OSGTextD.dll!std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::ch
ar_traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node::~_Node() + 0x19 bytes C++
OSGTextD.dll!std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::ch
ar_traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node::`scalar deleting destructor'() + 0x16 bytes C++
OSGTextD.dll!std::_Destroy<std::_Tree_nod<std::_Tmap_traits<std::basic_strin
g<char,std::char_traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node>(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_
traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node * _Ptr=0x10e0f9a8) Line 60 C++
OSGTextD.dll!std::allocator<std::_Tree_nod<std::_Tmap_traits<std::basic_stri
ng<char,std::char_traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node>::destroy(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,s
td::char_traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node * _Ptr=0x10e0f9a8) Line 160 + 0x9 bytes C++
OSGTextD.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_t
raits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Erase(std::_Tree_nod<std::_Tmap_traits<std::basic_string<char,std::char_
traits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::_Node * _Rootnode=0x10e0f9a8) Line 1172 C++
OSGTextD.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_t
raits<char>,std::allocator<char>
>,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy>,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >
>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std
::allocator<char> > const
,OSG::RefCountPtr<OSG::TextTXFFace,OSG::MemObjRefCountPolicy> > >,1>
>::clear() Line 972 C++
OSGTextD.dll!OSG::TextFaceFactoryBase::clearCache() Line
201 C++
OSGTextD.dll!OSG::TextFaceFactoryBase::~TextFaceFactoryBase() Line 98
C++
OSGTextD.dll!OSG::TextFaceFactoryBase::`scalar deleting
destructor'() + 0x16 bytes C++
>
OSGTextD.dll!OSG::SingletonHolder<OSG::TextFaceFactoryBase>::destroy() Line
63 + 0xfe bytes C++
OSGTextD.dll!boost::detail::function::function_invoker0<bool
(__cdecl*)(void),bool>::invoke(boost::detail::function::function_buffer &
function_ptr={...}) Line 94 + 0x5 bytes C++
OSGBaseD.dll!boost::function0<bool>::operator()() Line 989
+ 0x13 bytes C++
OSGBaseD.dll!OSG::osgExit() Line 514 + 0x1a bytes C++
BioSG.exe!CRibbonGUIApp::ExitInstance() Line 360 + 0x8
bytes C++
mfc90d.dll!CWinThread::Run() Line 630 + 0xd bytes C++
mfc90d.dll!CWinApp::Run() Line 865 C++
mfc90d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x01200000,
HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x001277ef, int
nCmdShow=1) Line 47 + 0xd bytes C++
BioSG.exe!WinMain(HINSTANCE__ * hInstance=0x01200000,
HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x001277ef, int
nCmdShow=1) Line 34 C++
BioSG.exe!__tmainCRTStartup() Line 578 + 0x35 bytes
C
BioSG.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!77303677()
ntdll.dll!77b79d72()
ntdll.dll!77b79d45()
------------------------------------------------------------------------------
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