Hi Mathias,

This may be an obvious question, but did you make sure that the
destructor of your drawable class is declared as "protected"?  I ran in
to this very situation and it was all because I didn't declare my
destructor as protected.  It cost me hours upon hours of debugging.

Chuck

On Thu, 2011-02-03 at 13:12 -0600, Mathias Buhr wrote:
> Hi,
> 
> I'm experiencing a strange segfault with an inherited osg::Drawable. 
> Unfortunately I'm currently unable to provide an example demonstrating 
> this. The application is a clustered rendering system and for various 
> reasons I have to (un-)load scenes during runtime. These scenes are 
> implemented as plugins (shared objects). The application implements an 
> "unrolled" frame() loop and (un-)loading these scenes happens after the 
> call to updateTraversal().
> The whole system is generally working but a newly created scene is 
> somehow problematic. The scenes consists only of a reimplemented 
> osg::Drawable where basically only drawImplementation() is overwritten. 
> This drawable renders a simple wire cube and display lists are disabled 
> (so drawImplementation() is called every frame). Rendering this scene 
> works fine.
> 
> Unloading and deletion of the shared object and its related data works 
> almost fine but the application crashes in unref() of a drawable during 
> the next cull traversal. Notice the "a" as I'm not entirely sure which 
> drawable is the problem (afaik there is only one).
> The really strange thing is that the destructor of my drawable isn't 
> called. If I additionally call ref() on this object the segfault 
> disappears but the destructor still won't get called. The problem seems 
> to be independent of the threading mode. I've tried singlethreaded and 
> could verify (via debugger) that no threads where running during the 
> removal of the sceneroot of the shared object.
> 
> How is it possible that the next cull traversal reaches this drawable 
> when it is removed from my scene root before the call to 
> renderingTraversals()?
> Is there anything obvious missing?
> Is there anything happening in the rendering backend that I should be 
> aware of?
> I haven't build OSG in debug mode but probably I'll try this next. Maybe 
> this will provide some useful insights.
> 
> I appreciate any idea on this.
> Best regards and thanks in advance
> Mathias Buhr
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-- 
===========================================================
Genex Systems
NASA Langley Research Center
Bldg. 1268A, Room 2124, Mail Stop 169
Hampton, VA  23666

Phone (757) 864-5476
Email [email protected]

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to