> I'm continuing to install the new JSBSim code. I've run into a strange
> problem. After I
> start up FlightGear and begin to parse an aircraft, I'll be humming along
> just fine
until
> I get to the point where the engine file is specified. When the engine file is
specified,
> it causes the file to be opened and read using a call to the easyXML routine,
> readXML().
> It's the same routine, of course, that is being used to successfully parse
> the main
> aircraft config file. This works fine in JSBSim standalone, but in
> FlightGear, when this
> second call to readXML() is made, the program dies:
>
> FlightGear aborting
>
> I'm wondering if I missed something in the build process?
>
> Jon
Here's my call to readXML:
--- start ---
bool FGPropulsion::Load(Element* el)
{
string type, engine_filename;
Element* document;
FGXMLParse *engine_file_parser;
ifstream* engine_file;
Element* engine_element = el->FindElement("engine");
while (engine_element) {
engine_filename = engine_element->GetAttributeValue("file");
if (!engine_filename.empty()) {
engine_file = FindEngineFile(engine_filename);
if (!engine_file->is_open()) {
return false;
}
} else {
cerr << "Engine definition did not supply an engine file." << endl;
return false;
}
engine_file_parser = new FGXMLParse();
readXML(*engine_file, *engine_file_parser); // <-- dies here
--- end ---
Anyone else out there use readXML()?
Jon
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d