Hi Marcus,
Marcus Lindblom wrote:
> 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. :)
I can't reproduce it on linux with the current trunk, but I don't think
anything has changed in that area since r1563. Even valgrind is happy
and reports nothing.
Can you try manually calling osgExit or try this
int main(int argc, char *argv[])
{
OSG::osgInit(argc, argv);
{
OSG::getDefaultMaterial();
}
return 0;
}
and see if it makes a difference? I'm wondering if the d'tors for local
variables in main run at a different point in time in relation to the
exit handlers on windows?
I'll try if I can reproduce this on windows.
regards,
Carsten
-------------------------------------------------------------------------
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