DevNote Dec-10-2007

Segmentation fault problem was smashed out

Dec-10-2007

I'm preparing the final check on releasing 0.9.11-pre2 (version number can be changed but at this moment, it is 0.9.11-pre2). After I fixed two bugs, as I mentioned before, I encountered a segmentation fault in exiting FlightGear 0.9.11-pre2.

This happens when fgfs quits before all the subsystems are initialized (e.g. quitting on splash screen, or specifying --help, or with wrong options). According to the crash report, the problem seems to be in somewhere in finalizing fgfs. this may indicate a possible uninitialized instance variable being released. So I took a look at src/Main/globals.cxx, and found the cause. There are several instance variables that are not initialized to NULL at the constructor of FGGlobals (FGGlobals::FGGlobals), but are to be deleted in its destructor (FGGlobals::~FGGlobals). So, I made a patch to properly initialize such instance variables.

Now, annoying segfault on exiting fgfs is gone Phew, I guess I'm ready to release the Mac version of FlightGear 0.9.11-pre2, (or it can be 1.0-pre).

p.s. The patch can be and should be applied to CVS/Head since I have the same problem on FlightGear CVS/Head as of today.