On 03.05.2011 17:05, Curtis Olson wrote: > 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. Really weird. Are you running pure GIT - or also some local enhancements? The sampleGroup pointer is always NULL on my system - and it seems we currently don't even create a "weather" sample group anywhere in the current code. So, *possibly* the root cause of your issues could be completely elsewhere (such as memory corruption issue overwriting the "sampleGroup" variable...). Also, "sampleGroup" isn't even used within the visual_enviro module - so we could probably even drop the pointer from the sources.
> 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? If "sampleGroup" was used, then it indeed should _not_ be removed in the ~SGEnviro. The SGEnviro object doesn't create the object itself - it's just given a pointer to an object from the outside. And such object would/should be owned by the sound manager. So, I think it's a good idea to remove the "if (samplegroup) delete ..." line in any case. cheers, Thorsten ------------------------------------------------------------------------------ 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