> 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
> I get to the point where the engine file is specified. When the engine file is
> 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()?


Flightgear-devel mailing list

Reply via email to