Hi, the same thing with _condition. It's systematically done wrong.
_textureData could be done correctly :-) Maik Maik Justus schrieb am 25.01.2007 22:58: > Hi all, > > I am not sure, but maybe we have the cause for the segfaults/failed > assert (big thanks at Joacim for finding the point). > > The _effectTexture is "loaded" by ssgTexture* > ssgLoaderOptions::createTexture. If the texture is already loaded, a > pointer to this texture is returned. > But SGShaderAnimation::~SGShaderAnimation() does not check, if the > texture is used by another object, it just deletes it without checking > the refcount of the texture or deleting it from the list, > createTexture is using. If then a multiplayer connects with an > aircraft using the same texture, createTexture returns the pointer to > this already deleted texture and flightgear crahses. > > The enclosed patch removes the deltete _effectTexture form the > destructor. (Didn't find out, how to reduce the refcount and delete > it, if refcount is zero and remove it from the list createTexture is > using). > > I think we should commit this to plib and head. > > Maik > > Index: shadanim.cxx > =================================================================== > RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/model/shadanim.cxx,v > retrieving revision 1.7 > diff -u -p -r1.7 shadanim.cxx > --- shadanim.cxx 1 Jul 2006 20:06:05 -0000 1.7 > +++ shadanim.cxx 25 Jan 2007 21:33:24 -0000 > @@ -618,7 +618,7 @@ void SGShaderAnimation::init() > SGShaderAnimation::~SGShaderAnimation() > { > delete _condition; > - delete _effectTexture; > + //delete _effectTexture; > delete _textureData; > } > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel