From: Anders G. <and...@gi...> - 2009-11-12 08:12:28
|
On Thu, 12 Nov 2009, Csaba Halász wrote: > Hi Everybody! Hi Csaba! Good work! > As you may know we have been recently investigating mysterious > segfaults experienced with some jsbsim aircraft such as the f16 or the > hansajet. > I have identified the following problems: > > 1) SGPropertyNode::getNode apparently stops parsing after an index. > For example, given /foo/bar[0]garbage it happily returns the node > /foo/bar[0]. > 2) Certain overloads of SGPropertyNode::tie invoke getNode without > checking the return value. > 3) FGTurbine::Load is missing a slash in the prefix and so ultimately > passes garbage to SGPropertyNode::tie. Did you manage to find out how that happens? I couldn't spot it in the code - AFAICS it doesn't happen in JSBSim/standalone and the involved JSBSim code ought to be the same. > 4) The checkTied in FGFDMExec.cpp is assuming property nodes with > children can not be tied. That's the one I found and fixed in JSBSim/CVS yesterday :) > 5) All over jsbsim plain SGPropertyNode objects are cast to FGPropertyManager > > Additionally Anders has found some trouble too, I suspect he has > checked in a fix to jsbsim cvs for that (but I haven't looked). > > The primary cause of the trouble is point #3, I have a simple fix > attached for it as well as for point #4. These are against gitorious > "next" branch but should be simple enough to apply manually if > necessary. Even with these checks I get a segfault with the Hansajet. > During testing, however, that worked as well. I had some other > modifications that I thought were irrelevant but looks like i was > wrong. I will re-apply those tomorrow. > > Apparently Tim has recently changed the props code, so I'll leave #1 > and #2 for him :) > > Finally, point #5 needs some thought. Yes, indeed. Cheers, Anders -- --------------------------------------------------------------------------- Anders Gidenstam WWW: http://www.gidenstam.org/FlightGear/ |