Thanks Paul, changes (including the later 0 termination fix) now merged and submitted to SVN.
W.r.t changes, these are exactly what I was contemplating as a solution - i.e. have the Windowing class "has a" GraphicsWindow. The only thing I think might need to be added for further safety would be an explict disable/close of the GraphicsWindowWX before the from within the OSGCanvas::~OSGCanvas(), the addition would protect from a viewer owning a GraphicsWindow after the OSGCanvas has been deleted. Robert. On Mon, Jun 16, 2008 at 8:59 AM, Paul Melis <[EMAIL PROTECTED]> wrote: > Hello Robert, > > Here is a reworked version of the osgviewerWX example. It changes the > GraphicsWindowWX to only inherit from osgViewer::GraphicsWindow and adds a > standalone widget, called OSGCanvas, that derives from wxGLCanvas. This > solves a problem with the GraphicsWindowWX instance being destructed twice > (see "Crash in osgviewerWX" of June 12th on osg-users). At program exit, the > main frame deletes all of its children widgets and therefore calls > GraphicsWindowWX's destructor, bypassing OSG's reference counting. The > GraphicsWindowWX instance is then later destructed a second time when the > reference held by osg::Camera goes to zero. This bug isn't exposed by the > example directly, but if people are going to use the example as a basis > (like the poster in the mentioned thread) they very likely will run into > this problem. > > Paul > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
