Hi,

My git build here recently started crashing on exit again.  I've been
looking into it and I think I traced it to
simgear/environment/visual_enviro.cxx in the destructor around line #190.
 This module builds up sound effects for thunder/lighting,  in a "weather"
sample group.  The module keeps a pointer to the sample group and then tries
to delete it in the destructor.

But i suspect that the sound manager is getting destructed first and the
sample group is already removed, so the pointer in visual_enviro.cxx is just
hanging out there still pointing to garbage ... so when we call the
destructor on it, we blow up.

The destructor has an "if (ptr == NULL)" type check, but obviously this does
nothing if something external deletes the object, and the module's pointer
never knows the difference so it is still non-null.

Anyway, would it be safe to remove this call to delete in the
visual_enviro.cxx destructor and depend on the sound manager destructor to
clean it up?  Or should we try to do something fancier?

Thanks,

Curt.
-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to