From: Curtis O. <cur...@gm...> - 2007-01-12 19:15:48
|
When I first looked at your patch, my first thought was that the original code should have worked fine and your patch shouldn't really make any difference. Maybe something else is corrupting the some structures ... an out of bounds array write or something??? These are tough to track down, but we appreciate any efforts to find these problems because the longer they are allowed to exist, the harder they are to find. Curt. On 1/12/07, Maik Justus <mj...@gm...> wrote: > > Hi, > > I still get segfaults at this position (in the plib-branch). Commenting > the delete calls seem to stop them, but we get a memory leak this way. > > Anyone else having segfaults? > > Maik > > > Maik Justus schrieb am 05.01.2007 11:16: > > Hello, > > > > sometimes I get a segfault in function > > SGShaderAnimation::~SGShaderAnimation(), file > > simgear/scene/model/shadanim.cxx. > > > > Please commit the attached patch. > > > > Maik > > ------------------------------------------------------------------------ > > > > Index: simgear/scene/model/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 > > --- simgear/scene/model/shadanim.cxx 1 Jul 2006 20:06:05 -0000 > 1.7 > > +++ simgear/scene/model/shadanim.cxx 5 Jan 2007 10:02:28 -0000 > > @@ -617,9 +617,9 @@ void SGShaderAnimation::init() > > > > SGShaderAnimation::~SGShaderAnimation() > > { > > - delete _condition; > > - delete _effectTexture; > > - delete _textureData; > > + if (_condition) {delete _condition; _condition=0;} > > + if (_effectTexture) {delete _effectTexture; _effectTexture=0;} > > + if (_textureData) {delete _textureData; _textureData=0;} > > } > > > > int > > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > 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 > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > -- Curtis Olson - University of Minnesota - FlightGear Project http://baron.flightgear.org/~curt/ http://www.humanfirst.umn.edu/ http://www.flightgear.org Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d |