Hi,
Have anyone else experienced problem with the refcount of simplematerial?
For me, the folling code crashes post-main in subReferenceRecorded():
int main(int argc, char *argv[])
{
OSG::osgInit(argc, argv);
OSG::getDefaultMaterial(); // putting it in a refptr does not help..
return 0;
}
On Win32 (Vista), using osg2 rev 1563 (slightly old).
The call stack is included below.
I can work around it by leaking a RefPtr to the material, so it's not
critical.
Can anyone with a newer version test to see if it has been fixed, if so
I'll just upgrade and recompile, otherwise it probably needs some
debugging. :)
Cheers,
/Marcus
P.S. OpenSG works well with QT4. I've got an SSMWidget. (Selectively
copy-paste from the QT-example in 1.8.) :)
** Callstack ********************************************************
OSGSystem_d.dll!OSG::FieldContainer::subReferenceRecorded() Line 151 +
0x8 bytes C++
OSGSystem_d.dll OSG::RecordedRefCountPolicy::subRef(OSG::FieldContainer
* const objectP=0x031cb5a0) Line 62 C++
OSGSystem_d.dll
OSG::RecordedRefCountPolicy::setRefd<OSG::SimpleMaterial
*,OSG::SimpleMaterial *>(OSG::SimpleMaterial * & pTarget=0x031cb5a0,
OSG::SimpleMaterial * pSource=0x00000000) Line 69 + 0xb bytes C++
OSGSystem_d.dll
OSG::RefCountPtr<OSG::SimpleMaterial,OSG::MTRecordedRefCountPolicy>::operator=(OSG::SimpleMaterial
* const objectPtr=0x00000000) Line 132 + 0xd bytes C++
OSGSystem_d.dll OSG::subRefDefaultMaterial() Line 280 C++
OSGSystem_d.dll boost::detail::function::function_invoker0<bool
(__cdecl*)(void),bool>::invoke(boost::detail::function::function_buffer
& function_ptr={...}) Line 87 C++
OSGBase_d.dll boost::function0<bool>::operator()() Line 815 + 0x11
bytes C++
OSGBase_d.dll OSG::osgExit() Line 741 + 0x1a bytes C++
OSGBase_d.dll OSG::osgExitWrapper() Line 711 C++
OSGBase_d.dll _CRT_INIT(void * hDllHandle=0x10000000, unsigned long
dwReason=0, void * lpreserved=0x00000001) Line 446 C
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users